MDL-43420 JavaScript: Add system to warn of deprecations properly
MDL-43420 Tests: Catch JS Exceptions in Behat tests

Look for any JavaScript exception being thrown, and pick these up in Behat,
failing tests.
MDL-43420 Tests: Catch JS Debug messages in Behat tests

Look for any YUI warning and error messages being logged, and pick these up
in Behat, failing tests.