Store pinning info in opam switch exports

Fixes  #1265, #1387

Note however that any manually edited overlay (`pin edit`) can't be kept
through export / import at the moment: metadata will be reset to that of
the package source or the repository.