nullptr -> NULL

this fixes the build on GCC 4.4
re-add a reference solution of the reservoir problem for optimized GCC builds
fix 'make headercheck'
fix doxygen warnings