confparse: fix file descriptor leak (found with Coverity)
crule: implement dead-code removal and optimizations pointed out by coverity
extcmodes: robustness improvements pointed out by coverity