MDL-41030 behat: Dock blocks compatible with both selenium and phantomjs
MDL-41030 Behat: Add support for waiting for javascript

This is so that phantomjs (which runs faster than selenium) can pass the tests.
MDL-41030 JavaScript: Convert remaining YUI2 IO calls to YUI3
MDL-42625 behat: Editing .feature files
MDL-42625 behat: Step definitions + related changes in features

In general aiming for compatibility with multiple browsers,
firefox, chrome and phantomjs to be more specific.

* Removing hardcoded waits
* Adding @_alert, @_switch_window and @_switch_frame tags,
  to label actions that different drivers have problems with.
* Adding missing @_files_upload and @_only_local tags to features that
  uploads files.
* Fixing a few wait for page ready what specified miliseconds.
* New methods to ensure elements (usual selectors), sections and editors
  are ready to interact with
* Changing the select an option implementation to deal with the different
  drivers implementations when listening to JS events.
MDL-42625 TinyMCE: Hook into API to track the progress of the init script
MDL-42625 behat: Make behat pacient

* When looking for texts inside the page or inside
  other containers we should wait until the elements
  are visible.
* Same when expanding tree nodes.
* Normalizing loops to spin() function using
  behat_base::TIMEOUT and behat_base::EXTENDED_TIMEOUT,
  leaving TIMEOUT for DOM load processes and
  EXTENDED_TIMEOUT for long processes that involves JS
  too.
* Add page load waits between actions that involves
  reloading the page.