Tesla's head of battery engineering leaves