House ousts Kevin McCarthy as speaker in historic vote