Static analysis

I still need to tweak Travis so that it runs scan-build for us instead of clang, but `scan-build scons` behaves as you'd expect and produces reports suitable for scan-view.