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.

Resolves #36 : Map handling for int keys is broken

Added test case to show map handling is correct.
Merge pull request #37 from JonathanO/master

Resolves #36 : Map handling for int keys is broken