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
Merge pull request #1474 from OCamlPro/switch-reinst-pin

Pin import fixes
Makefile: fix dependencies calculation
Travis: building `opam-check` before running tests
Add comments in `OpamGlobals.mli`
Remove `opamTypes.ml`
Add missing mli dep in Makefile