The Chinese EV maker lifted deliveries and revenue in the second quarter, but a surge in research and development spending nearly tripled its net loss.