added ability to store large integers as ints in KeyV1 format #820

We still compare them as doubles if they are compared with other doubles.
However, this allows us to store hashed index keys as fast KeyV1 keys,
rather than slow BSON keys

fixes #820