Add rubocop config and fix most non-doc warnings.