Fixes from rubocop

Rubocop is like checkstyle or PHPMD.  Its nice because it has some ability
to autofix the issues it finds and it enforces ruby idioms we like.  This
commit sets it up and squeezes it for almost all its worth in terms of
cleanup.

The gemfile update to pick up rubocop also grabbed some other updates and
the mediawiki_api update required some small modifications to work with its
new api.

Change-Id: I1a7ceaa2655fd87853bf1efd5490591c6978d344