Luca di Montezemolo to leave Ferrari after 23 years