Check for EWOULDBLOCK as well as EAGAIN on write.

On some systems, notably HP PA-RISC systems running Linux or HP-UX,
EWOULDBLOCK and EAGAIN are not the same value.  POSIX (and these OSes) allow
EWOULDBLOCK to occur on write(2) (and send(2), etc.), so check explicitly
for this case as well as EAGAIN by defining and using a macro GIT_ISBLOCKED
that considers both.

The macro is necessary because MSYS does not provide EWOULDBLOCK and
compilation fails if an attempt is made to use it unconditionally.  On most
systems, where the two values are the same, the compiler will simply
optimize this check out and it will have no effect.
Merge pull request #2121 from bk2204/ewouldblock

Check for EWOULDBLOCK as well as EAGAIN on write.
Improve error propagation in shallow call
Readability
Merge pull request #2124 from libgit2/better-shallow-errors

Improve error propagation in shallow call