Resolves #36 : Map handling for int keys is broken

Key encoding/decoding is handled differently from other values. Ints are now encoded as strings.
As a bonus, keys are now restricted to int and string types as that's all that PHP can cope with.