Elon Musk's request for a court order blocking OpenAI from converting itself to a for-profit company has been rejected by a US judge.