Set error message for branch functions

There were a couple of places where an error was being returned
from branch related code but no error message was being set.
Simplify error reporting
Make sure error messages get set
fix typo
Add error messages for failed submodule lookup
More care catching and setting config errors
More care reporting diff patch iteration errors
Report stat error when checking if file modified
Set error when no merge base is found
Report errors finding notes
Report a couple object error conditions
Catch some odd odb backend corner case errors

There are some cases, particularly where no loaded ODB backends
support a particular operation, where we would return an error
code without having set an error.  This catches those cases and
reports that no ODB backends support the operation in question.
Report some errors returnable by push
Error messages for a couple other boundary conditions
Factor out some code that needed to clear errors

A number of places were looking up option config values and then
not clearing the error codes if the values were not found.  This
moves the repeated pattern into a shared routine and adds the
extra call to giterr_clear() when needed.
minor missing error message
Fix one error not reported in revparse

There are many paths through revparse that may return an error
code without reporting an error, I believe.  This fixes one of
them.  Because of the backtracking in revparse, it is pretty
complicated to fix the others.
Clear error msg when we eat error silently
clarify where error message is set
clarify error propogation