Be proactive about checking for error codes.

For libgit2 functions that return 0 or 1, as if it were a Boolean value, we may assume that there is no error and simply check whether the return code was non-zero.  In the case of `git_index_has_conflicts`, this is not a problem, as the libgit2 function will always return 0 or 1.

We could be proactive about this and check for < 0 as well - if someone were to change the libgit2 implementation, they may assume that bindings are checking for < 0 to indicate error and make changes in that manner.

This is really to open up for discussion whether we want to be proactive in this manner or not.