Enforce key length constraint of 4096 bytes.

Aside from needing to enforce a constraint of some sort, this change
allows us to definitively specify KeyMax, removing the previous requirement
that keys stored in the map couldn't start with \xff.
KeyMax can be used as an end key, but not as a start key. I added a check for that.