Add "coverity scan" static code analysis

Detects memory leaks and other artifacts that need fixing.