Add a public interface to jsoncheck.py

blueprint modularize-doctest

Add to jsoncheck.py a public interface for external users (such as
doctest.py) to call. It consists of three functions:

check_syntax(path)
check_formatting(path)
fix_formatting(path)

Internal functions are renamed to have an underscore prefix.

Change-Id: I1ef6f389e97bb0b30382f165efae449bd0dfd50f