test(dialog): Add test for window dialog boxes

Window dialog boxes, as triggered by window.onbeforeunload, are
handled differently then alerts. This tests their functionality.

This test demonstrates https://github.com/angular/protractor/issues/1486