Pkg: refactor base/pkg.jl to just cd and calls an entry point.

This is ready but I'm not merging it into master since https://github.com/loladiro/BinDeps.jl/issues/58 is already causing chaos. We can merge once that's settled down and I can verify that this doesn't further break anything, although I'm fairly confident that it doesn't.

cc: @loladiro