Code cleanup in snippets.js
Code cleanup in snippets.js

- remove implicit variable declarations
- fix various JSHint warnings
- fix indentation
- replace for-in by jQuery.each

mantisbt-plugins/snippets,mantisbt-plugins/snippets