Minimize regex usage

It was mentioned in passing that we use regular expressions a fair amount in libgit2. I didn't think that was the case, so it motivated me to look at our regular expression usage. It turns out there are five places where regular expressions are used in the library. Three of them are pretty essential: revparse, diff function context searching, and config file entry searching. Two of them are not, however:

* revwalk uses a regular expression to check if a pushed revision glob contains any wildcard characters. Since it is just looking for one of three characters, it is easier to just call `strcspn`.
* remote listing uses a regular expression to match configuration entries, but since `git_config_foreach_match` now does regular expression matching for you, it is easy to just eliminate this and simplify the code.

While I was fixing up these places, I cleaned up a number of warnings in the code that I encountered. I can extract those warning fixes into a separate PR if this delayed much, but it was just nicer to have a warning-free PR.