MDL-43420 JavaScript: Add system to warn of deprecations properly