Restore part of 85f04a 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. Strictly speaking it would be better to set the content
of the editor rather than rerender the whole thing, but we'll fight that dragon
some other day.
Merge pull request #1 from oerpub/63207788-fix-images-tables-p2

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