Phase detectors give an output proportional to phase difference. If the two input frequencies are identical, you will get a DC voltage (sometimes you need a lowpass filter to remove the 2F component) proportional to phase difference. If the frequencies are different, you get an output signal whose frequency is the difference between the two inputs. There is no way of knowing which input is the higher frequency. Simple phase detectors are indeed multipliers. The XOR is the digital equivalent of an analog multiplier. If you look at the mathematical result of multiplying two signals, you will see that the output has sum and difference frequencies. The lowpass filter, as I mentioned, is generally needed to remove the sum component.
The D flipflop is a bang-bang phase detector, i.e, it's output is not proportional to phase error. Instead, it will output a one or a zero (or vice versa, depending on the circuit) , depending on whether the input leads or lags the reference.
BTW, I spent about 18 years designing the input and genlock PLLs in video time base correctors, so I'm not just spouting something I read in a book (no offense intended).
As I mentioned, the MC4044 phase/frequency detector is a good part for frequency comparison, and it will tell you which input is high and which is low. It has no noise immunity (can't handle glitches or analog signals), so you need clean digital inputs.
Another way to compare frequencies is to use two frequency-to-voltage converters and a comparator. There will be a delay in the output due to the lowpass filters in the F to V converters.