DRILL-1107: Fix possible infinite loop in merging receiver

This bug was introduced in previous patch.
DRILL-1116: Flush batch when copy fails due to insufficient space
DRILL-1117: Fix stats in partition sender
DRILL-879: Fix show files to treat '/' as a root of workspace instead of FS
DRILL-755: Show files without FROM clause should display files in default workspace
DRILL-1101: For Union-All, allow strings of different lengths on either side of the union to be treated as compatible.
DRILL-1118: In case of error, always set QueryState to FAILED

+ Added a null check in o.a.d.exec.physical.impl.producer.ProducerConsumerBatch.clearQueue()
DRILL-1113: Add configuration in DrillClient to encode complex/repeated types as JSON string
DRILL-1060: Support ComplexToJson for Array Data Type