(19864) Enable num2bool to accept numeric input

Since the function tries to match the argument against a regex, first
coerce the argument to a string so that the match can happen.  Also
include some additional unit tests.