Teach bayestar_localize_coincs about PSD caches

Real pipelines, like gstlal, will write out PSD files that
are suitable for packing into a LAL-style cache. Now,
bayestar_localize_coincs supports a --reference-psd-cache
option to tell it where to find a list of PSDs, indexed by
detector and GPS time interval.
Repair some stupid mistakes in reference PSD cache
Track API change in lalsimulation
Break ties when two PSDs match

Also add some code comments.