Massive overhaul of PhaseDetector

The user can now select up to 5 different phase detectors within the same
module, each triggered on one of four different phases. Each can have
its own unique input channel, output channel, and gate. This is a vast
improvement over what we were dealing with beforehand.