Tesla reported negative free cash flow in the second quarter for the first time in more than two years as the EV maker accelerated spending on ‌infrastructure for its AI and robotics ambitions.