Add clar helpers for testing file equality

These are a couple of new clar helpers for testing that a file
has expected contents that I extracted from the checkout code.

Actually wrote this as part of an abandoned earlier attempt at a
new filters API, but it will be useful now for some of the tests
I'm going to write.
Add clar helper to create new commit from index

There were a lot of places in the test code base that were creating
a commit from the index on the current branch.  This just adds a
helper to handle that case pretty easily.  There was only one test
where this change ended up tweaking the test data, so pretty easy
and mostly just a cleanup.
Some tests with ident and crlf filters

Fixed the filter order to match core Git, too.

This test demonstrates an interesting behavior of core Git (which
is totally reasonable and which libgit2 matches, although mostly
by coincidence).  If you use the ident filter and commit a file
with a garbage ident in it, like '$Id: this is just garbage$' and
then immediately do a 'git checkout-index' with the new file, Git
will not consider the file out of date and will not overwrite the
file with an updated $Id$.  Libgit2 has the same behavior.  If you
remove the file and then do a checkout-index, it will be replaced
with a filtered version that has injected the OID correctly.
More filtering tests including order

This adds more tests of filters, including the ident filter when
mixed with custom filters.  I was able to combine with the reverse
filter and demonstrate that the order of filter application with
the default priority constants matches the order of core Git.

Also, this fixes two issues in the ident filter: preventing ident
expansion on binary files and avoiding a NULL dereference when
dollar sign characters are found without Id.