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.
fix #349 maxwidth/maxheight issues in Dialog

After delivering #349 via commit 29331b13d5724498ca8bb8a8566564499ed0bf36
a regresion was found during release testing: maxwidth/maxheight
constraints of the Dialog were calculated too big due to addition of the
shadow. That addition should be done only in maximized mode.

Moreover, the Dialog was not correctly resized in maximized mode when
it had maxWidth/maxHeight set. Now that properties are ignored in
maximized mode.

Close #359.
fix #276 icon button test case
1.3.5