Update sphinx and hacking requirements

Update the sphinx version allowed for building documentation.

Update the version of hacking used for code checks. At the same time,
fix the code that causes new checks in hacking 0.9 to fail.

Change-Id: Iafbfaf961838de9e6a1c2f5d474929cafd049a70