Pass the collator reference instead of the Btree handle to the "standard"
lexical comparison functions, then everybody can use the same macros.