MDL-39528 behat: Avoid modal window suite failure

Catching JS alerts/confirms exceptions and
auto-accepting them before each test run to
avoid chained scenarios failures.