changed int/double comparison #820

While it's true that we would only choose to pack an int as an int if it's
over 2^52, a user-input double that's over 2^52 will still be stored as a
double, not converted to an int.  Therefore we can't assume something
packed as an int is necessarily larger or smaller than something encoded
as a double, in fact very large user-inputted data, while it would have
low precision, could be much larger than any representable integer and
would have to be encoded as a double.

Therefore, if either number is a double we must convert both to double and
compare them.

Also, try to help out branch prediction to avoid making the existing case
slower.