Elon Musk’s rocket and satellite maker SpaceX is leaning toward listing its shares on the Nasdaq ​for what could rank as the biggest initial public offering of all time, according to four people familiar with the company’s thinking.