Tesla is losing top executives as it lays off thousands of workers