Tesla reported slimmer earnings, but its energy business is growing