[coding] Fix codes according to Code Climate advice.

- Use global directive to explicitly state global variables used.
- Put missing semicolons.
- Fix position of && in long boolean expression.
- Remove unused variables.
- Use strict compare operator (===, !==).
- Use 'new' keyword when invoking a constructor.
[readme] Add code climate badge.
Merge branch 'code-climate' into develop