(maint) Enable rubocop checking for shadowed variables

Previously, we allowed variables to be shadowed by variables
of the same name at local scope. This can make for confusing
reading to someone new to the code (and can potentially indicate
logic errors).

So this commit enables rubocop checking for shadow variables. It
also fixes (by renaming) all extant shadowed variables. Naming
is hard, but a best effort was made.
My understanding is that an `if` branch doesn't define a new scope (only an actual block does).

I haven't found a great writeup of this, but see http://www.ruby-doc.org/docs/ruby-doc-bundle/UsersGuide/rg/localvars.html, esp the part beginning "Generally, the scope of a local variable is one of"