Revert "Revert "Create and use versioned package dir by default.""

This reverts commit d869093994976156c7beed631b0e87a9466288b7.
Fix Pkg.Cache paths, closes #5615 and #5612
Merge pull request #5617 from JuliaLang/fix_5615

Restore #3344 and fix #5612, #5615