A confluent reduction for the λ-calculus with surjective pairing and terminal object