jsoncheck: make formatting check optional

blueprint modularize-doctest

doctest.py expects to enable syntax checks and formatting checks
individually. This patch changes jsoncheck.py to allow that.

The former boolean "format" argument becomes "formatting", a variable
that can be either "check" or "fix".

A ValueError is thrown if an invalid formatting argument is given to the
function (to be caught by external callers).

Change-Id: If57af0c6f0d46de69c0785635cd57c3a0995654e
Merge "jsoncheck: make formatting check optional"