German train drivers' union and railway operator reach a deal in their long dispute