Added documentation for lib/__init__.py and lib/misc.py.

Added a index.rst file for the cli library. Compiling in sphinx does not work for now.