lexgen: handle 'ref' as procedure input type (#788)
This tries to resolve the situation discovered in
https://github.com/bluesky-social/indigo/pull/785, with the ozone
"upsertSet" procedure.
That lexicon specifies the input schema via reference, instead of an
"object" schema in-place.
This code could use real review, I just banged on it until it worked for
the current lexicon.