Make utility implement standard serializable interface

Changes the serializaer interface so that it provides `loads` and `dumps`. This allows the cache to either use the included smart serializer or a more simple implementation (such as just passing a reference to the `json` module) for testing.