Automate the libgit2 compatibility check.
Automate the libgit2 compatibility check.

First, we should not check against LIBGIT2_SOVERSION, but check against
the major and minor version numbers. Also, instead of hardcoding the
compatible versions, we now use the minor and major  version numbers
from the bundled libgit2 version.

tpickett66/rugged,libgit2/rugged,tpickett66/rugged,tpickett66/rugged,libgit2/rugged,saraid/rugged,saraid/rugged,saraid/rugged,Acidburn0zzz/rugged,Acidburn0zzz/rugged,libgit2/rugged,Acidburn0zzz/rugged