Home Racing Mekies to leave FIA to join Ferrari in technical role