comment out variables/defines not used in code

* will correspond to #undef of these variables/defines in config.h.in
attempt cleanup of config.h mess

* undef defines that don't appear to be used in the code
* use cmakedefine01 if the code uses #if FOO
* use cmakedefine if the code uses #ifdef FOO or #if defined FOO
* note the incorrect comments (not to 1!) and (to 1!)
* note the inconsistent use where define used with both #ifdef and #if