(PUP-2909) enable static checking with rubocop 

This enables rubocop with a few selected checkers (cops). These selected allowed finding a few errors which are also fixed along with this checkin. The enabled verifiers include:

Lint/UnreachableCode
Lint/ConditionPosition
Lint/UselessComparision
Lint/LiteralInterpolation

These style checkers were found to be triggered on a very small number of problems which were found to be real problems. I have also marked a few checkers as 'MAYBE' which I feel might help puppet development, but as of now results in a large number of warnings. The rest of the checkers should only be enabled after verifying that they are indeed useful for puppet codebase.
I think we should enable this one, even though it will reveal _a lot_ of cleanup that needs to be done.

The reason being is that `and`, `or` are _control flow_ operators while `&&` and `||` are logical operators. Using `and` in a conditional statement instead of `&&` [can lead to unexpected results](http://devblog.avdi.org/2010/08/02/using-and-and-or-in-ruby/) and we probably have a few broken logical statements in the code base because of this issue.