global: refactoring

* Fixes the problem unhandled during the "pending" states addition.

* Improves the code coverage.

Signed-off-by: Yoan Blanc <yoan.blanc@cern.ch>
global: sane requirements

* Adding back version.py file.
  http://python-packaging-user-guide.readthedocs.org/en/latest/tutorial.html

* Putting the requirements into setup.py and leaving the
  requirements.txt file for development mode.

Signed-off-by: Yoan Blanc <yoan.blanc@cern.ch>
docs: the docs

* Adds building the documentation from travis.

* Bumps version to 0.2rc1

Signed-off-by: Yoan Blanc <yoan.blanc@cern.ch>