Only import sphinx during hook processing

When pbr is imported to handle writing the egg_info file because of
the entry point, it's causing sphinx to get imported. This has a
cascading effect once docutils is trying to be installed on a
system with pbr installed. If some of the imports fail along the way,
allow pbr to continue usefully but without the Sphinx extensions
available. Eventually, when everything is installed, those extensions
will work again when the commands for build_sphinx, etc. are run
separately.

Also slip in a change to reorder the default list of environments run by
tox so the testr database is created using a dbm format available to all
python versions.

Change-Id: I79d67bf41a09d7e5aad8ed32eaf107f139167eb8
Closes-bug: #1403510
Use post version signifiers

PEP440 is unhappy about revcounts after pre-release tags.

Change-Id: I553a0bf9f522d50bcbdb16756c994058bd27da77
Properly check for git before getting git dir

We cannot get the git dir if git is not installed. Check that git is
installed before querying for the git dir. Return None if the git dir
cannot be found or if git is not installed.

Change-Id: Ic8e0c74a779b23842369a8cf01fcbf37885202ef
Fixes-bug: 1326682
Merge tag '0.10.4' into master

Releasing 0.10.4

Change-Id: I048cd25bf21eacd39883801ab79c4b91832fb395