Formula 1 teams are using artificial intelligence to see inside engines, improve their pitstops, make better strategy calls and to learn from their mistakes.