Accept non-string literals when ordering by function.

Currently order_by_function only accepts arguments of type Array, Symbol, or String. Since the functions often deal with math, it is natural to want to use numeric types as well. FunctionComp already does the work of converting fields to_s, so this PR changes it to more liberally accept non-string literals.