Merge pull request #2076 from xtao/fix-zstream

Fix write_object.
Add some missing const declarations.
Make sure git_remote_dup copies a remote's refspecs correctly.
Merge pull request #2052 from arthurschreiber/arthur/add-git_remote_dup

Fix git_remote_dup & add missing const
repository: move to use a git_buf for outputting strings

Since we now export that type, we can avoid making the user guess a
size.
branch: move to git_buf when outputting newly-allocated strings

Internally we already did everything with git_bufs, so this is just
exposing those functions with public names.
config: use git_buf for returning paths

Again, we already did this internally, so simply remove the conversions.
messsage: use git_buf in prettify()

A lot of the tests were checking for overflow, which we don't have
anymore, so we can remove them.
refspec: move to git_buf for outputting strings
MSVC doesn't like modern code
MSVC doesn't like modern code neither
Make blame example compile on MSVC
Merge pull request #2079 from linquize/msvc-blame-example

Make blame example compile on MSVC
Merge pull request #2078 from linquize/msvc

MSVC doesn't like modern code neither
Merge pull request #2077 from libgit2/cmn/buf-out

Buff up returning strings
Merge pull request #2075 from libgit2/cmn/leftover-oid

Leftover OID -> ID changes
Got permission from Gustaf for userdiff patterns
Update Javascript userdiff driver and tests

Writing a sample Javascript driver pointed out some extra
whitespace handling that needed to be done in the diff driver.
This adds some tests with some sample javascript code that I
pulled off of GitHub just to see what would happen.  Also, to
clean up the userdiff test data, I did a "git gc" and packed
up the test objects.
Add PHP tests and fix bug in PHP builtin driver
Merge pull request #2066 from libgit2/rb/builtin-diff-drivers

Add built in diff drivers