Electric automaker Tesla posts record profit in Q1