Rationalize the code for updating repositories (#622)

Right, every backend should now have to implement only 3 actions, with a much simpler semantics.

We already had:
- pull-repo: Update a repository with this backend type
- pull-archive: Download an archive file for this backend type (always return a filename)

and now we have:
- pull-url: Download the contents of an url, return either a filename or a dirname, depending of the backend type.

And 'pull-url' is used:
- when reading url's file contents to download a package
- when a package is pinned to a given path

The current backend's behaviors:
- HTTP backends can only 'pull-url' files
- GIT/darcs/HG can only 'pull-url' directories
- LOCAL (rsync) backends can either pull files or directories (that's easy to test with [Sys.is_directory]).
Use input_channel instead of buffering the intermediate string when reading files.
Speed-up reading of state.db
Speed-up 'opam list'
Added post-messages support in packages
and returning more information about what has been done
Added local variables to pass success status to the post-messages
Ref: #662
Merge pull request #697 from AltGr/master

Added post-messages support
Added end-of-message dots
Fixing removal of optional dependencies (#692)
Fix not complete yet: reverse depopts are not removed, but not recompiled yet
Fixed recompilation of packages when removing their optional dependencies
Fixed action message for recompiled packages
Closes #692
Merge pull request #707 from AltGr/rm-depopts-fix

Rm depopts fix
Fixed stack overflow on malformed opam files (closes #696)
Merge pull request #708 from AltGr/fix-696

Fixed stack overflow on malformed opam files (closes #696)
Finding packages case-insensitively for common commands
(unless packages with the same name up to capitalization exist)
closes #705
Merge pull request #710 from AltGr/fix-705

Finding packages case-insensitively for common commands
Updated generated man-pages for 1.1.0
Updated tutorial pdfs to latest version
Documented post-messages
Added test for post-messages
Closes #662