jQueryUI: correct return type of dialog methods

Also corrected / added a couple of tests