Expose git_buf_put.

Use git_buf_put to handle memory allocation in pygit2.
Please review :-)