Added Clang static analyzer and script

- Also made clang fixes