Better mirror path calculation.

- Add support in spack.url for extrapolating actual file type for URL
- Move mirror path computation to mirror.py from package.py
Merge branch 'features/better-mirror-support' into develop