Four teenage boys have been detained for life for the murders of two best friends who were stabbed to death in a case of mistaken identity.