Fix select_ref_det for real populations.
Fix select_ref_det for real populations.

The encoded maximum population was being compared to the decoded current
reference population when deciding whether to change, effectively
ignoring ref_det_factor.

ruthfranklin/hande,hande-qmc/hande,hande-qmc/hande,hande-qmc/hande,hande-qmc/hande,hande-qmc/hande