jsoncheck: use ValueError to pass errors to outside callers

With this patch, errors that need to be passed back to external callers
are raised in ValueError.

The message indicating that a file has been successfully reformatted is
still directly printed for the CLI interface of jsoncheck. External
callers can choose to have that message printed by setting verbose=True.

blueprint modularize-doctest
Change-Id: I85071fe0e96c8787f14f9f9eb0b3c123e22e0c75
Merge "jsoncheck: use ValueError to pass errors to outside callers"