Update dependencies and fix Rubocop issues

This commit updates the Ruby/Gem dependencies and then the code as
required to pass the new rubocop cops. EmptyLinesAroundBody has been
split in to EmptyLinesAroundModuleBody and EmptyLinesAroundClassBody.
An AbcSize metric has been introduced and the default overriden to 18,
setting this any lower causes far too many invasive refactorings where
they arn't required.  IntelliJ code formatting settings are also in
line with the new cops.

[#83541054]