Tesla is closing in on Mercedes in the luxury space while continuing to fend off rivals in the growing electric vehicle market.