TestFunctionsForJSON: added tests for invalid ad-hoc queries, and
especially for new bugs ENG-6978 & -6979 (involving arrays with very
large indexes); made minor additions and fixes for tests of FIELD; also
tweaked testProcWithValidJSON and testProcWithInvalidJSON (& added a new
version of the latter), to give more information when they fail; and
added optional ‘print’ arg to (private) debugPrintJsonDoc method (which
is now called by testProcWithInvalidJSON).