pkg2 wip: functions to get the installed & available versions.

Probably need further information about installed packages in order
to know what to do after version resolution, but this is what you
need in order to do version resolution. The available() function is
unfortunately slow and would certainly benefit from not spawning so
many subprocesses.
Merge branch 'master' of github.com:JuliaLang/julia