A compressible two-layer model for transient gas–liquid flows in pipes