A JSJ splitting for triangulated open 3-manifolds