moved AVL_TREE cmake code to one place

and cleaned up cmake file
removed HAVE_CTIME config file

using -D instead
Cleaned up CMakeLists files
Moved CMake options all to one place