Commutative subalgebras of three first-order symmetry operators and separation of variables in the wave equation