Use per-file .rubocop.yml for staged files

Rubocop supports using a separate configuration file on a per-directory
basis. For each file, it first checks the directory that file is in,
then recursively scans upwards until it finds a `.rubocop.yml` file; if
it finds none it checks the user's home directory.

Overcommit wasn't running Rubocop with the appropriate configuration if
a user had a directory-specific configuration.

The solution was to extract all relevant Rubocop configurations for all
files, and to run each group of files against that particular
configuration (this is better than naïvely running each file separately
with its own config, which could take a long time with many files).

Change-Id: I0b11748eb3f346dca4aff3351dd5d73fa72be50f
Reviewed-on: https://gerrit.causes.com/30059
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>