json: add hb_get_preview_json

No idea if it actually works as advertised.  Probably not ;)
Returns a json representation of an hb_image_t with the data
encoded in base64.

Also, fix a bug in hb_set_anamorphic_size_json that probably would have
cause it to just fail.

And fix a couple of memory leaks.


git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6609 b64f7644-9d1e-0410-96f1-a4d463321fa5
json: fix memory leak in hb_get_preview_json

forgot to call hb_image_close on the image


git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6610 b64f7644-9d1e-0410-96f1-a4d463321fa5