Tesla shares fell more than 8% in premarket trading after the electric carmaker reported second-quarter earnings that missed expectations.