A unified pipe-network-based numerical manifold method for simulating immiscible two-phase flow in geological media