KIJI-40. Fix issue where 500 was being thrown on fetching an instance.

This was due to an Avro serialization issue where the instance object was being
written to JSON using the generic writer. This couldn't properly serialize an
enum whereas the specific writer could. Now, if the record to be serialized is a
specific record then the specific writer will be used else the generic one will
be used.

Reviewer: lsheng