Stable and Efficient Time Integration of a Dynamic Pore Network Model for Two-Phase Flow in Porous Media