#1081: run cmakelint and fix most warnings on CMakeLists.txt files

The only warnings I don't fix are lines > 80 characters.
The most common warnings fixed are:
- Expression repeated inside endif; better to use only endif() [readability/logic]
- Weird indentation; use 2 spaces [whitespace/indent]
- Line ends in whitespace [whitespace/eol]
- Do not mix upper and lower case commands [readability/mixedcase]
- Mismatching spaces inside () after command [whitespace/mismatch]
- Tab found; please use spaces [whitespace/tabs]
#1018: run cmakelint on about half the files in cmake and fix warnings

I lost steam for now, but there was a lot of clean up work done
Merge branch 'develop' of github.com:casadi/casadi into develop