DRILL-1002: Fix TestSqlBracketlessSyntax.checkComplexExpressionParsing() on Windows
DRILL-836: [addendum] Drill needs to return complex types (e.g., map and array) as a JSON string

* This contains additional changes to the original patch which was merged.
+ Renamed "flatten" to "complex-to-json"
+ With the new patch, we return VARCHAR instead of VARBINARY.
+ Added test case.
+ Minor code re-factoring.
Commit dd2ae0ae got lost during merge, reintroducing the race condition.
DRILL-793: Fix output type's scale and precision for math functions.
Add alias names date_diff, date_sub alias to date subtraction functions
DRILL-976: Fix extract second to return only second portion of interval; exclude hours, minutes
DRILL-995: Removed inner form (which is not allowed). Fixed NPE and URLs.
Improve error messaging for OperatorStats assertion messages.
DRILL-1001: Expanded ProfileWrapper content and formatting.
DRILL-699: Allow case insensitive function names in queries.
DRILL-842: Aggregate function for correlation coefficient calculation
Enhancements to capture HashAggregate and HashJoin runtime metrics.
Improve OperatorStats to avoid leaking state.  Fix issue where HashJoinBatch throws NPE in stats tracking if we don't have HashTable.