Set parent window, geometry when showing hidden child window

Calling -[NSWindow orderOut:] removes the child window from its parent.

Also, we call setCocoaGeometry() before adding the child window as this
prevents the child window flashing in the screen's top-left corner right
before being added.

Change-Id: Id3f2fbfcb91b0a3491040775a8e3758e3bc45b68