Added a .rubocop.yml file, and code for using it.

This is a template/example file that's also used when checking the rubocop source code.