Merge of r5130, r5131, r5132: support for Mercurial repositories.

*) Misc: switch to single export operation in "zip" target.

   While exporting parts of the tree might be better in some cases, it
   is awfully slow overseas, and also requires unlocking ssh key multiple
   times.  Exporting the whole repo and removing directories not needed for
   zip is faster here.

   It is also a required step before we can switch to Mercurial.

*) Misc: removed unused "snapshot" target.

*) Misc: support for Mercurial repositories.
Merge of r5133, r5134: peer.free() and peer.get() balance.

*) Upstream: only call peer.free() if peer.get() selected a peer.

*) Upstream: removed double-free workarounds in peer.free() methods.
Merge of r5138: use of NGX_FILE_ERROR.

Use NGX_FILE_ERROR for handling file operations errors.

On Win32 platforms 0 is used to indicate errors in file operations, so
comparing against either -1 or NGX_OK is not portable.

This was not much of an issue in patched code, since only ngx_fd_info() test
is actually reachable on Win32 and in worst case it might result in bogus
error log entry.

Patch by Piotr Sikora.