Further improvements to docking/nesting panel behaviour

Adding two panels in one direction and two in the opposite direction then
removing them one at a time now works properly. (see new integration test)
Updated tutorial to use WildFly 8.1
Made the debugging stuff a little easier to read and remember
Fixed panel leak bug in the "remove empty docking panels" code

The bug was causing perspective switching not to work (there is a check for left-over
panels in the perspective switching routine, and it was being tripped)

There are also a few unrelated refactorings in the panel sizing code; this happened
because I forgot to commit the fix before moving on.