Clean up handling of unknown-type inputs in json_build_object and friends.

There's actually no need for any special case for unknown-type literals,
since we only need to push the value through its output function and
unknownout() works fine.  The code that was here was completely bizarre
anyway, and would fail outright in cases that should work, not to mention
suffering from some copy-and-paste bugs.
Create a tuplestore registry.

This allows a tuplestore to be referenced through an abstract ID
number, similar to Oid.  This is necessary for the planning steps.
Merge branch 'master' into transition