Privatize a val in UnitCodec
Make JsonCodec.apply return the exact type of its argument

...and make the AutomaticJsonCodecBuilder use JsonCodec.apply to
find codecs so that it can make direct calls to codecs that are
defined as "object"