New theoretical limit for keys and keychains: ULONG_MAX. Try to enforce it.

long ints are unsigned now everywhere where we are dealing with key or
keychain index numbers.
Try to enforce it where we are counting or do arithmetics with them, or
read them as input from the user.
Adjust regression tests accordingly, and extend Changelog with this
information.