ball.h: fix release compilation.
CMakeLists.txt: install library and executables.
Fix some errors (valgrind check).