Fix problem where collapseAll() and other asynchronous Tree methods resolve too early.   Fixes #16378, refs #16431 !strict.
Refactor Tree code using Deferreds, leveraging chaining abilities of new dojo/Deferred module that allow expressions like promise1.then(function(){ return promise2; }).then(function(){ return promise3; }), which don't resolve until promise1, promise2, and promise3 have all resolved.

This indirectly fixes spurious console error messages when a Tree animation is cancelled, because for example the user started expanding a node but then clicked again to collapse it, before the original animation was finished.   The problem was that there was previously code like animationDeferred.then(successHandler), with no failureHandler, and that caused dojo/promise/instrumentation to print the log messages.

Fixes #16430 !strict.
Return Promise rather than Deferred from public methods, but as usual shimmed with the addCallback() and addErrback() methods for backwards compatibility.

Refs #16430 !strict.
Don't require children of Menu to have class "dijitMenuItem", fixes #16426 on trunk/ !strict.
Need to use lang.delegate() to add methods to Promise because it might be frozen, thanks neonstalwart.  Refs #16430 !strict.
fix test failure caused by [30088], refs #16394
fix test failure caused by [30088], refs #16394
Avoid exception on IE when browser window refocused after switching to another application.   Thanks DaveHS, fixes #16437 !strict.
Don't specify <body> padding in em for test files; it causes the right border of the !TabContainer to disappear in IE8 (due to some IE bug).   Also removed some unneeded/inert CSS from the !TabContainer test files.   Fixes #16020.   Note that the right border is still disappearing in IE6, but that's not worth fixing.

Had to change dijit.css to avoid problem where bottom border of !TabContainer was disappearing again though.   Changed !TabContainer.domNode CSS from overflow-y:visible to overflow:visible.    Overflow:visible was apparently problematic back in [27031] but seems to be working now.   The change doesn't affect IE6 which has it's own overflow:hidden rule.  Refs #14164.
Windows 8 Store Apps throw an exception when trying to set an element's name attribute via innerHTML.   So avoid doing that on Windows 8 Apps.   Instead, do it via the _setNameAttr custom setter.   This is how it should be done for all platforms starting in 2.0.

Old code to set name via innerHTML was left in place for supporting the older versions of IE (refs #8660, #8484).    Also, this.nameAttrSetting needs to be remain until 2.0 for backwards compatibility, because custom widgets may be referencing it in their templates.

Changes were tested locally on firefox by changing the conditions in _FormWidget.js and !MappedTextBox.js from !has("win8app") to has("ie").

Fixes #16452 !strict.
Fix regression where _HasDropDown subclass can no longer be defined unless it sets this.focusNode.   Also adding rudimentary test file for _HasDropDown (although it's already tested extensively via the test files for subclasses like !ComboBox).   Fixes #16473 on trunk, !strict.
Fix exception trying to adjust range when nothing is selected, fixes regression from [27235] on trunk, refs #14331 !strict.
Clear the page._wrapper reference of StackContainer.removeChild(page).    Because although the wrapper was destroyed, the page will live on... unless removeChild() was called as part of the destruction of the !StackContainer.  Refs #16242, #16244 !strict
Simplify logic to destroy tablist, avoiding problem on !TabContainer.destroyRecursive(true) where we try to reference a pane that was already destroyed.    Note though that the preserveDom flag is explicitly documented as being unsupported for templated widgets like !TabContainer.   Fixes #16475 !strict.
Get rid of !StackController's map from page id to button.   It's not really needed, and seems like getting rid of it brings us one step closer to server side instantiation.    Refs #16475 tangentially !strict.
Deprecate dojo/html::_emptyNode() since it just calls dojo/dom-construct::empty().   Also, add setTimeout() to test case to avoid so many warning from sIEve.   Finally, update dojo/html test to be partially baseless (but still more work left).   Fixes #16481 on trunk !strict.
Set role=region for the popup wrapper.  Fixes #16466 !strict.   Patch from Mike Billau (IBM, CCLA), thanks!
Don't define cssStateNodes Object in _CssStateMixin's prototype, since it may lead to programming errors in subclasses that try to modify this shared object.    Fixes #16486 !strict.
Quick fix to avoid exception when mousing over MenuSeparator, fixes #16491, refs #16426 on trunk !strict.
Use has("dojo-bidi") flag for dijit too, same as dojox/mobile.   Flag enables/disables support for textdir parameter.

This check-in also tries to untangle each widget's bidi support code from the general widget code, putting the bidi support code into a separate section of each widget's file.   The bidi support code for each widget either monkey-patches the original widget class, or replaces it with a subclass.   In the latter case, need to give the superclass and subclass different declaredClass names, or dojo.declare() won't work.   In either case, the value returned from the module (when has("dojo-bidi") is true) is the bidi enabled class.

Also, remove lots of unneeded code from BIDI test files, unnecessarily copy-and-pasted from other test files.  Plus cleanup of spacing etc.

Fixes #16489, refs #15778 !strict.