reorganize new relops code
generalize sorting of unique_ptrs on compilers that suck