adding WITH_DOC parameter to cmake

This patch makes it possible to choose, either to build and install the doc with ``make``, ``make install`` or not.

Fixes #412