Implemented download of packages residing in mercurial repos.

* Moved download handling code into a download module.
* Documented how versioning works for repos (via tags).
* More info during install about what tag is picked.
* Refactored download code to be more generic.