lol this worked first try wtf
Per-object filtering
Random eviction
What has science done.
Duplicated type object
Per-object max size
Some stats
No longer needed
Clear the cache when there are too many items to expire
Global option setters
Use git_odb_object_data/_size whereever possible

This uses the odb object accessors so we can change the internals
more easily...
Add range checking around cache opts

Add a git_cache_set_max_object_size method that does more checking
around setting the max object size.  Also add a git_cache_size to
read the number of objects currently in the cache.  This makes it
easier to write tests.
Add mutex around mapping and unmapping pack files

When I was writing threading tests for the new cache, the main
error I kept running into was a pack file having it's content
unmapped underneath the running thread.  This adds a lock around
the routines that map and unmap the pack data so that threads can
effectively reload the data when they need it.

This also required reworking the error handling paths in a couple
places in the code which I tried to make consistent.
Add tests for oidmap and new cache with threading

This adds some basic tests for the oidmap just to make sure that
collisions, etc. are dealt with correctly.

This also adds some tests for the new caching that check if items
are inserted (or not inserted) properly into the cache, and that
the cache can hold up in a multithreaded environment without error.
Add callback to git_objects_table

This adds create and free callback to the git_objects_table so
that more of the creation and destruction of objects can be table
driven instead of using switch statements.  This also makes the
semantics of certain object creation functions consistent so that
we can make better use of function pointers.  This also fixes a
theoretical error case where an object allocation fails and we
end up storing NULL into the cache.
Simplify object table parse functions

This unifies the object parse functions into one signature that
takes an odb_object.
clean up tree pointer casting
Further threading fixes

This builds on the earlier thread safety work to make it so that
setting the odb, index, refdb, or config for a repository is done
in a threadsafe manner with minimized locking time.  This is done
by adding a lock to the repository object and using it to guard
the assignment of the above listed pointers.  The lock is only
held to assign the pointer value.

This also contains some minor fixes to the other work with pack
files to reduce the time that locks are being held to and fix an
apparently memory leak.
Add git__compare_and_swap and use it

This removes the lock from the repository object and changes the
internals to use the new atomic git__compare_and_swap to update
the _odb, _config, _index, and _refdb variables in a threadsafe
manner.
Fixes for Windows cas/threading stuff