Define {any,all}/{0,1} in terms of {any,all}/2
Define {any,all}/2 independently from {any,all}/0
Make `values` faster (fix #652)
Use __attribute__ __printf__ with GCC
Merge pull request #601 from slapresta/redefine-any-all

Define {any,all}/0,1 in terms of {any,all}/2
Fix #348: reject unescaped control chars
Fix bug caused by 8ca07a0
Module search revamp for pkg managers

The search path listed in an import directive can now be an array.  The
top-level search path is appended.  Null and empty strings in the path
terminate any search.  The "." in "." and "./*" is replaced with the
directory containing the file doing the import (for command-line
programs this is the current directory, though that may be a bad idea).

No version numbers or anything of the sort are gratuitously added to the
search paths.

All this makes external package managers possible by allowing
dependencies to be installed local to dependents.
Add Streaming parser (--stream)

Streaming means that outputs are produced as soon as possible.  With the
`foreach` syntax one can write programs which reduce portions of the
streaming parse of a large input (reduce into proper JSON values, for
example), and discard the rest, processing incrementally.  We should add
an exit builtin (or use `break` or `error`) and processing can even
terminate early.

This:

    $ jq -c --stream .

should produce the same output as this:

    $ jq -c '. as $dot | path(..) as $p | $dot | getpath($p) | [$p,.]'

The output of `jq --stream .` should be `[[<path>],<leaf>]`.  To prevent
ambiguities, the start of any array and object yields a path with a -1
or null (respectively) for the last component of the path, and no leaf.

Hmmm: The -1/null thing is a bit bogus.  Instead we should return empty
arrays and objects as leaves!

For example, a truncated input produces a path as soon as possible, then
later the error:

    $ printf '[0,\n'|./jq -c --stream .
    [[-1]]
    parse error: Unfinished JSON term
    $

Here's an example without that error:

    $ ./jq -c --stream .
      0 [1] [2,3] [4,[5,[6,7]]]
      [[],0]
      [[-1]]
      [[0],1]
      [[-1]]
      [[0],2]
      [[1],3]
      [[-1]]
      [[0],4]
      [[1,-1]]
      [[1,0],5]
      [[1,1,-1]]
      [[1,1,0],6]
      [[1,1,1],7]
    $

Anyways, a work in progress.

Testing will involve torture JSON inputs, and their hand-coded streamed
equivalents for comparison.

Fix streaming bugs and add tests
Add --stream-errors (undocumented) for testing

With --stream this returns `["<error msg>",[<path>]]` upon error.