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

Also, check errors from git_tree_entry_dup
Fix tests for Python 2.6