Pin import fixes

* Corrected version of imported pinned packages
* Do not revert pinning state once we get to the install phase
* Correctly re-import pins during `pin reinstall` (behave as
export-cleanup-reinstall compiler-reload state-import)

Closes #1387