convert images array into an image url

this converts the image id in the images array into a url for popit
hosted images and also populates the image property with the url of the
first image in the images array for popolo spec compatability

Fixes #470
make sure images set over the API are displayed

At the moment the popit front end doesn't follow the same data model as
popolo for images so when you include and image URL over the API they
aren't displayed by the website. This does the required processing on
the uploads to fix that.

Fixes #432
test API handles image attributes correctly

make sure we create an images array from an image attribute and vice
versa