merge tjoneslo: Fix the outputFormat json_with_metadata tests to use

Merge pull request #1471 from tjoneslo/sql-layer/test-json-output-format-add-ordering
https://github.com/FoundationDB/sql-layer/pull/1471

(cherry picked from commit 2d45070688d53a621f19b5e8cb6628a23ce9420a)
merge ScottDugas: Fix nested unions not casting correctly

Merge pull request #1470 from ScottDugas/sql-layer/make-rowtypes-consistent
https://github.com/FoundationDB/sql-layer/pull/1470

(cherry picked from commit b155b0815c525bdb7d39a14aa460c25c27dd9b35)
merge tjoneslo: Incompatible meta data version error message

Merge pull request #1472 from tjoneslo/sql-layer/incompatible-meta-data-version-error-message
https://github.com/FoundationDB/sql-layer/pull/1472

(cherry picked from commit 17b897442c54b05b628926bbc2a97c840b04ccc6)
merge MMcM: Meta-data output in JSON for procedures was not legal JSON.

Merge pull request #1473 from MMcM/sql-layer/sql-routine-json-type-formatting
https://github.com/FoundationDB/sql-layer/pull/1473

(cherry picked from commit d754eb47bb4db28cd08cbbdcf1589317e2b60615)
merge ScottDugas: index bounds row types

Merge pull request #1474 from ScottDugas/sql-layer/null-rowtypes
https://github.com/FoundationDB/sql-layer/pull/1474

(cherry picked from commit 50544b54b073e71214186a21606a4884d2bdaacb)
merge MMcM: Mark JSON with meta-data output as ordered to keep FTS from trying to sort it

Merge pull request #1476 from MMcM/sql-layer/test-script-procedures-fts
https://github.com/FoundationDB/sql-layer/pull/1476

(cherry picked from commit 58104adc603789d5582584a11a1c3f69dd65d895)
merge MMcM: Some minor updates to the patterns for PgPool-II meta-data queries.

Merge pull request #1481 from MMcM/sql-layer/pgpool2-meta-data-query-updates
https://github.com/FoundationDB/sql-layer/pull/1481

(cherry picked from commit 83b0ece3b0b8eccabeacf13f7016cf59c3cc2b78)
merge hchandl: Fix assertion error with expression subqueries as conditions

Merge pull request #1483 from hchandl/sql-layer/subqueryAsCondition
https://github.com/FoundationDB/sql-layer/pull/1483

(cherry picked from commit e6fa52404c9e0adc3e4bbaac36af0f684849b98c)
merge hchandl: Add ambiguous collation exception, fix various other collation problems

Merge pull request #1479 from hchandl/sql-layer/evenMoreCollation
https://github.com/FoundationDB/sql-layer/pull/1479

(cherry picked from commit 636aa49a4929cf549caf776bc83496efdb192b37)
merge nathanlws: Disable end of test-unions-with-null during FTS

Merge pull request #1485 from nathanlws/sql-layer/disable-union-with-null-fts
https://github.com/FoundationDB/sql-layer/pull/1485

(cherry picked from commit bd4cda936af2dd28046bdd25fe8de52902a697e2)
merge MMcM: Include RETURNING ("generated keys") in REST query / execute JSON

Merge pull request #1486 from MMcM/sql-layer/rest-sql-generated-keys
https://github.com/FoundationDB/sql-layer/pull/1486

(cherry picked from commit 18425050f0ab413f2359c05f567278515512e1c8)