Simplify and fix the pretty-printing of OPAM files.

Initial patches from @avsm
Merge branch 'master' of github.com:ocaml/opam
More simplifications to the pretty-printing of OPAM files
Merge pull request #998 from samoht/master

Fix #997