Style and linting updates for RuboCop

This corrects the codebase for latest style and linting guidelines
from RuboCop. A fix for RuboCop's name change in 0.23.0 has been
applied as well.