The UK and Stormont government are to fund the Derry to Heathrow service until 2027.