Refactor opam variable resolution, and add new variables
Variable resolution in opam files

The behaviour has slightly changed, but should be more powerful and the code much clearer:
- in the opam file of `pkg`, `%{variable}%` will now be understood as `%{pkg:variable}%``
- the information returned (eg. version) corresponds to the current opam file if relevant, OR to the installed version of the named package

Todo:
- fix the manual accordingly
- fix `opam config var list`. We probably don't want every var for every package there.
- extend the compilation environment to make the new variables accessible from the build scripts ? (probably not for costly ones
Fix the 'version' variable for pinned packages
Fixed the 'hash' variable
Rewriting variables in post-messages
Closes #989
Do not continue after C-c during the solver call
Add a package-local 'build' variable
Closes #1040
Fix incompatibility with older OCaml stdlib
When the request is unsatisfiable, use the default solver to provide explanations if the external one does not.
Merge pull request #1132 from AltGr/opam-variable-goodness

Refactored and extended variable resolution in opam files
Merge pull request #1126 from AltGr/refs/heads/rebase-#1106

When the request is unsatisfiable, use the default solver to provide explanations if the external one does not.
dev-manual: document variables
Only display global variables in `opam config list`
Merge pull request #1136 from AltGr/document-variables

dev-manual: document variables
when asking confirmation, retry on unknown input

Before:

  $ opam install why3; echo "finished"
  The following actions will be performed:
   - install zarith.1.2 [required by why3]
   - install coq.8.4pl2 [required by why3]
   - install lablgtk.2.16.0 [required by why3]
   - install ocamlgraph.1.8.3 [required by why3]
   - install alt-ergo.0.95.2 [required by why3]
   - install why3.0.81
  6 to install | 3 to reinstall | 0 to upgrade | 0 to downgrade | 0 to remove
  Do you want to continue ? [Y/n] toto
  finished

After:

  $ opam install why3; echo "finished"
  The following actions will be performed:
   - install zarith.1.2 [required by why3]
   - install coq.8.4pl2 [required by why3]
   - install lablgtk.2.16.0 [required by why3]
   - install ocamlgraph.1.8.3 [required by why3]
   - install alt-ergo.0.95.2 [required by why3]
   - install why3.0.81
  6 to install | 3 to reinstall | 0 to upgrade | 0 to downgrade | 0 to remove
  Do you want to continue ? [Y/n] toto
  Do you want to continue ? [Y/n]

The list of considered-unambiguous answers was also extended to
include "Yes" and "No", for example.
Merge pull request #1137 from gasche/master

when asking confirmation, retry on unknown input
Use `install` instead of `cp` and setup cleaner permissions on installed files
Merge pull request #1140 from AltGr/install-not-cp

Use `install` instead of `cp` and setup cleaner permissions on installed files
Added a share_root installation destination
Needed for installing eg. editor modes in PFX/emacs/site-lisp ; hacks using '../' wheren't pretty
Merge pull request #1141 from AltGr/install-to-share

Added a share_root installation destination