Moody's upgraded Tesla's credit ratings, citing its leadership in the EV market.