Tesla has reported its first annual revenue decline as it cuts the Model S and Model X, pivots manufacturing to humanoid robots and deepens investment in AI.