Restore part of 85f04a (in github-bookeditor) that was reverted.

This appears to be a problem with any document with images. @render() is called
multiple times, and you have to clean up and re-initialise Aloha after
every render (up to three times). Strictly speaking it would be better to set the content
of the editor rather than re-render the whole thing, but we'll fight that dragon
some other day.