Elon Musk's Grok chatbot melts down – and then wins a military contract