Augment internal queue interface. Update BufferedBlockMgr to use it more.

Change-Id: I662fde6165726767787b722f5b74d10f94fe158c
Reviewed-on: http://gerrit.ent.cloudera.com:8080/3543
Reviewed-by: Marcel Kornacker <marcel@cloudera.com>
Tested-by: jenkins
IMPALA-1078: report better error with empty literals.

Currently, the scanner is throwing an IOException when encountering an
empty literal, and so no parse error is formulated.  Fix this by
adding a token type for empty literals.  This new token doesn't appear
in the parser's grammar, and so a nice parse error will be generated
when the parser encounters an empty literal token.

Also add a regression fe test case.

Change-Id: Ib1ad0470ebc30b6fc827c9420745ecd83fc5e1ae
Reviewed-on: http://gerrit.ent.cloudera.com:8080/3539
Reviewed-by: Marcel Kornacker <marcel@cloudera.com>
Tested-by: jenkins