Panel: Bail upon opening animationComplete() if the panel has closed

Hook up animationComplete() to the wrapper, if present, and only otherwise to
the element, because the animation class is only added to the element if there
is no wrapper.

The tests now need to wait for the panel to actually open in order to hit all
the assertions, because some assertions are made only upon panelopen.

Closes gh-7264
Fixes gh-7236
Table: Restrict selector scope by using generated popup ID

Closes gh-7342
Fixes gh-7341
Build: Don't use casper.clickLabel

Re gh-7330
Demos: malformed anchor in navigation menu

Fixes gh-7329