Streaming parser (WIP! DO NOT USE)

Here's a streaming parser, still in the works.  Streaming means that
outputs are produced as soon as possible.  With the `for` 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.  Add an exit builtin (or use `error`)
and processing can even terminate early.

This:

    $ jq -c --stream '. | select(length==2)'

should produce the same output as this:

    $ jq -c '. as $dot | path(..) as $p | $dot | getpath($p) | scalars | [$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.

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.