(PUP-2885) Remove timeout around entire plugin sync operation

This removes the timeout around the entire plugin sync. With the
default setting of configtimeout to 2min, this means that the entire
sync must be performed within this time. This conflicts with the
individual timeouts for connecting and reading and may cause that a
perfectly valid operation is timed out in the middle of productive work.
(PUP-2885) Change find_all to each

There is no need to make a find_all() call here since we are not doing
anything with the results. Results are added manually into the
previously declared array 'files' instead. Changing the find_all() to
each() to make it a little more clear.
Merge pull request #2853 from hlindberg/PUP-2885_dueling-timeouts

(PUP-2885) Remove timeout around entire plugin sync operation
(maint) Remove duplicate rest-client entry and add explantory comment
Merge branch 'master' into puppet-4
(PUP-2909) rubocop - Lint/UnreachableCode
(PUP-2909) rubocop - Lint/ConditionPosition - unnecessary elseif

This is a trivial bug without any side effects. The correction has the
same behavior as the original.
(PUP-2909) rubocop - Lint/ConditionPosition - replace elseif

    elsif => else
      new_key = mapping[key][:key]
      new_value = method(mapping[key][:method]).call(value)

Here, if the mapping[key][:key] was nil, then new_value would not
have been assigned. However, the behavior is still the same as old
because the method checks for new_key before returning a value.
(PUP-2909) rubocop - Lint/UselessComparison - bug in sort

    files_by_name.keys.sort { |a,b| b <=> b }.each do |path|

comparison b <=> b is invalid, and should be a <=> b
(PUP-2909) rubocop - when _: is no longer valid syntax

Replaces when _: with when _ <\n>
(PUP-2909) rubocop - meth{|my[opt]|} is no longer valid syntax in 1.9

replace meth{|my[opt]|} with meth{|o| my[opt] = o}
(PUP-2909) rubocop - enabled rubocop

The added cops are in .rubocop.yml : All but a few very useful cops have been
disabled.

The rubocop may be invoked using
```
rake rubocop
```
(PUP-2909) rubocop - Lint/LiteralInInterpolation

catch unnecessary interpolations
(PUP-2909) rubocop - disable Style/Encoding
(PUP-2909) rubocop - add to Gemfile
(PUP-2909) rubocop - should require directories to contain files in the sorted order
(PUP-2909) rubocop - disable in ruby 1.8

rubocop is not supported < 1.9.2