The 50-hour strike that had been called to start on Sunday evening across Germany's rail network has been averted after the union and rail operator Deutsche Bahn came to a compromise.