Add complex types to cog predict (#2261)
* Add integration test for JSON in cog predict
* Test that we can use cog predict on a typeddict
* Support complex types in cog predict
* Check the OpenAPI schema
* If it isn’t a string, attempt a JSON parse
* Fix stdout check
* Allow for schema retrieval errors
* Only serialise if the type is an object
---------
Signed-off-by: Will Sackfield <sackfield@replicate.com>