Tesla, ex-engineer settle lawsuit over Autopilot source code