Fix fieldmanager media field

Fieldmanager media field is broken.

The cause is that the JS programatically updates the hidden input field, and the normal events that trigger the updating of the model don't fire.

So we need to do this manually - when the frame is closed. This is a little hacky in that we have to wait for the frame to be created before attaching the event - hence the setTimeout - but it works!

Review & Merge cc @danielbachhuber 
Should we include the comment about why we're using `setTimeout()`?