Elon Musk’s SpaceX will lay off about 10 percent of its more than 6,000 employees, a source familiar with the matter said on Friday.