Standardise empty lines throughout codebase

Done with `rubocop --auto-correct --only EmptyLineBetweenDefs,EmptyLines,EmptyLinesAroundBody`
Standardise indentation of access modifiers

Done with `rubocop --auto-correct --only AccessModifierIndentation`
Remove trailing blank lines

Done with `rubocop --auto-correct --only TrailingBlankLines`
Remove trailing whitespace

Done with `rubocop --auto-correct --only TrailingWhitespace`
Update rubocop todo list
Merge pull request #2951 from fog/style_whitespace

Styling clean up of whitespace