Improved Window.resizeToFitChild() behaviour.

If called on an as-yet unshown window, it would move the window to the top left corner of the screen. Now the window will still be opened in a sensible place. Added additional shrink and expand arguments to further control the resize behaviour.
Fixed bug in Window.resizeToFitChild() when window is unshown.

The "current size" of the window is meaningless in this case, so we must not take it into account, not matter what the values of the shrink and expand arguments.
Fixed OpDialogue size behaviour.

It now automatically expands if necessary when the parameters or details panes are first shown.