fix #348 animation event in non-browser

Make sure that Delegate can be loaded even in non-browser environments like Rhino or nodejs where window/document are not defined
feat #349 maximizable dialog

Dialog can be now maximizable. If configured so, it will have a button to
maximize/unmaximize next to the close button. It also reacts to the change
of the data model property "maximized". That property takes precedence
over center, xpos, ypos, width, height changes.

When maximized, Dialog occupies the whole viewport and is not
movable/resizable. After unmaximizing, it returns to the original
position, size and other capabilities.

Close #349. Close #358.