Fix small bug at re-pinning

could lose metadata when old pin was to a non-repo version
Define OPAM file template to help creation/pinning
Merge pull request #1439 from OCamlPro/pin-templates

Start from a template when pinning without metadata