AutoNation’s net income jumped in the second quarter on record revenue generated by surges in new- and used-vehicle sales and higher margins.