Add RuboCop, fix violations

Fix Ruby 2.0.0 compatibility, drop 1.8.7 compatibility