regex: Fixed several warnings about signed/unsigned conversions.
regex: Fixed warnings about unused parameter values.

There are different solutions to the problem. In this change, we
define an UNUSED macro that maps to __attribute__((unused)) when
compiling with gcc. Otherwise it is a NOOP. We apply this macro
in all function headers for each parameter value that is not used
within the function body.

The change is local to regex.
pack: introduce a delta base cache

Many delta bases are re-used. Cache them to avoid inflating the same
data repeatedly.

This version doesn't limit the amount of entries to store, so it can
end up using a considerable amound of memory.
pack: refcount entries and add a mutex around cache access
pack: abstract out the cache into its own functions
pack: limit the amount of memory the base delta cache can use

Currently limited to 16MB (like git) and to objects up to 1MB in
size.
pack: packfile_free -> git_packfile_free and use it in the indexers

It turns out the indexers have been ignoring the pack's free function
and leaking data. Plug that.
Merge pull request #1224 from sba1/some-regex-warning-fixes

Some regex warning fixes
Merge pull request #1228 from carlosmn/delta-base

Introduce a delta base cache
regex: Proper define for this thing
pack: That declaration
Fix indentations
errors: Introduce EMERGECONFLICT error code
checkout: Deploy EMERGECONFLICT usage
Fix MSVC compilation warnings
Fix MSVC Clar compilation warnings
Merge pull request #1227 from nulltoken/topic/emergeconflict

Introduce EMERGECONFLICT
Revert "pack: packfile_free -> git_packfile_free and use it in the indexers"

This reverts commit f289f886cb81bb570bed747053d5ebf8aba6bef7, which
makes the tests fail on Windows. Revert until we can figure out a
solution.