Add Doxygen documentation.

With the cmake flag -DBUILD_DOXYGEN, there will be a `make doc` target that creates HTML documentation in doc/.