DRILL-1435: ensure producer consumer returns the last batch indicator & prevent blocking/leaking producer & consumer threads; fix concurrency issues that drives sqlline & drillbit hanging