Implement checkNamespaceScopedStatics

Avoid static variables in namespace and global scope in headers.

I'm not sure about the warning message, so feel free to change it.