Add "len(treebuider)" to the API
Add merge-base method.
Add TreeBuilder.get and remove TreeEntry.to_object

Also, check errors from git_tree_entry_dup
Fix tests for Python 2.6
Rename "low level" reference creation methods

Rename Repository methods:

- git_reference_create          => create_reference_direct
- git_reference_symbolic_create => create_reference_symbolic
Remove all warnings during compilation.

- Many PyLong_FromLong changed into PyLong_FromLongLong.
- A long used as out argument for git_config_parse_int64 changed into a
  int64_t.
- Many len variables changed from int into Py_ssize_t. Removed some
  castings related to those variables.
- Functions py_str_to_git_oid(_expand) return a Py_ssize_t, which is the
  return type of PyBytes_AsStringAndSize. Error values are usually casted to
  int, since the only error returned from those functions is -1.
- Changed RefLogIter i and size fields from int into size_t.
- Marked to_unicode_n and to_bytes inline functions as "unused". Not all
  compilation units which include utils.h use them.

Tested with:
$ clang --version
Apple clang version 4.0 (tags/Apple/clang-421.0.57) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin12.3.0
Thread model: posix
Merge remote-tracking branch 'xtao/merge-base'
update documentation on creating blobs
Re-work the checkout API

New API:

  Repository.head = refname
  Repository.checkout_head(strategy)
  Repository.checkout_index(strategy)
  Repository.checkout_tree(treeish, strategy)

Changed API:

  # Before
  Repository.checkout(strategy=GIT_CHECKOUT_SAFE_CREATE, reference=None,
                      head=False)

  # Now
  Repository.checkout(refname=None, strategy=GIT_CHECKOUT_SAFE_CREATE)
Merge remote-tracking branch 'bors/create_blob'
Merge branch 'master' into master-py24

Conflicts:
	pygit2/repository.py
	test/test_tree.py