fix #349 issues and missing tests for maximizable Dialog

Fixed issues with: Dialog maximized from start, resizing
Dialog while maximized, resizing viewport while Dialog
maximized.

Perf and readability improvements (`changeProperty` vs
`setProperty`). Test for destroying/creating Draggable/Resizable.