DRILL-1393: Set record count before clearing SV2 in RecordBatchData
DRILL-1526: Move casting logic to utility methods.
DRILL-1303 - Fix Drill Client assertion on getting bad metadata