Fix --enable-debug

Set proper CFLAGS for debug mode.
Remove useless checks
Put more debris into gitignore
Use proper setup for paranoid options

... and fix some minor bugs for debug options
Merge remote-tracking branch 'upstream/master'