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
Merge pull request #1132 from AltGr/opam-variable-goodness

Refactored and extended variable resolution in opam files