Re-order top of stack.sh

Re-order the setup and check bits in the top portion of stack.sh to
have a logical flow with similar things done together.  Also moves the logging
setup earler to make it available for debugging config variables.

No behaviour changes are intended aside from the order of execution.
Any such changes are bugs.

* Do sanity checks that have no configuration needs earlier
* Do supported distro check earlier
* Configure logging earlier
* Set exit traps earlier
* Set errexit earlier (required one outside fix so far)
* Set xtrace earlier to capture more of the OpenStack service configuration

Change-Id: I7d15bac199d6c4382d4a4d222784d34f2707da56
Merge branch 'cinder-backends' into dt-test
Merge branch 'add-pre-install' into dt-test
Merge branch 'new-ceph-backend' into dt-test
Merge branch 'reorder-stack.sh' into dt-test
Merge branch 'test-ini-improvements' into dt-test
Merge branch 'usb-prereq' into dt-test
Merge branch 'conf-tempest' into dt-test