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
compile fix and correctness fix #820
fixed compile #820
fixed logic error in KeyV1Owned constructor #820