Teach StagedFile which lines were changed

In order to support complex hook checks such as only returning an error
when a lint is detected on a line that a user touched, a `lines_changed`
method was added to the `StagedFile` class, which returns a set of
numbers representing the lines that were changed (1-based).

In the process, specs where added for the `StagedFile` class (as it
previously didn't have any). In order to support this, a module
`GitSpecHelpers` was added with functionality to make working with `git`
repositories a little easier. This was necessary to test `StagedFile`,
since its implementation is tightly coupled to using `git`.

Change-Id: Id3781a994d670f83979e08d77035fec97d0345ee
Reviewed-on: https://gerrit.causes.com/25158
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Don't cache result of modified_files

In the process of adding specs for the whitespace linter, I discovered
that running the specs in isolation worked, but running the entire suite
would hang.

Investigation revealed that because we were caching the result of
`modified_files`, any test which caused `modified_files` to be called
would cause that value to be cached for later calls. This resulted in
the whitespace check spec hanging because `grep` would be invoked with
no command-line arguments (since a previous test had cached
`modified_files` as an empty list).

Since we aren't invoking this method very often, I opted to remove the
caching as a simple solution.

I also removed an unnecessary class name from a method call to
`modified_files`.

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