Generic popup implementation #1

* Started implementing more generic popup implementation. This should
eventually help us in easily creating additional popups for elements
other than "just" widgets/placeholders, such as popup pages of rows,
containers, pages and site properties.
* Generates html of popups in a more generic way (used by widgets only
so far)
* Generates update of html of popups in a more generic way (used by
widgets only so far)