Buffered Tuple Stream fixes.

This patch fixes two issues:
  - Add API to buffered block mgr to allow an atomic Unpin and GetNewBlock. This has
    the semantics of unpinning a block and giving the buffer to the new block. This
    is necessary for the tuple stream to make sure another thread does not grab the
    unpinned block in between.
  - Buffer management reading an unpinned stream. Before moving onto a new block (and
    unpinning the current), we need to make sure all the tuples returned from the
    current block are returned up the operator tree.

Change-Id: I95ee58d1019dd971f6a7dc19ecafdfa54cdbf942
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4333
Tested-by: jenkins
Reviewed-by: Nong Li <nong@cloudera.com>
Fixed TPCH Query 15

Rewrote TPCH Query 15 to use an inline view.

Change-Id: I6755cc054ead14b032f7f59ea0f519b45e404b7d
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4287
Reviewed-by: Taras Bobrovytsky <tbobrovytsky@cloudera.com>
Tested-by: jenkins
IMPALA-1240: TestCancellationFullSort hits mem limit of 300MB with tpch_parquet

The test sets a mem_limit of 300MB and does:

   delay(t)
   assert(query_state != EXCEPTION)
   cancel()

If the mem_limit is hit before the delay completes, the assert will fail.  So,
the test is racy.  It appears we are right on the 300 MB memory limit (on my
machine, the query completes with peak mem usage in the high 200 MB).

I'm not sure why the mem_limit dimension was added, but given that it makes
the test racy and doesn't seem to add value, let's remove it and re-enable the
test.

Change-Id: I63767161bec6d7d6cd3de2e4563425297ffccb0d
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4366
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: jenkins