Migrated codec checkers for JSON and YAML.

Migrated the codec checkers from charmstore to be used in multiple repositories, e.g. core.