Sort import against styleguide

This sorts almost all the imports against the styleguide guidelines.  I'm getting tired of rebasing it so best to get it into the code.  This might mess with any outstanding work you have so wanted to PR it first.

There are some that I have left where I wasn't sure if the imports where ordered in some way because of dependencies between imports.

Included is a dev requirement for the isort program which does the sorting.

 We're not at a state where we can run isort unattended I'm afraid because it can't handle situations where we have try blocks in the import section and outputs one line post import block where we seem to use two.