Tesla has said that its fourth quarter loss narrowed sharply from last year, as revenue surged amid growing sales of its Model S sedan.