Transport Secretary Patrick McLoughlin has agreed to create a new rail executive to be responsible for all government rail functions.