Performs a multi-level three-way comparison on numbers/strings and returns 1, 0, or -1.
Creates a three-way comparison callback.