Add support for URLs with query strings

- support tarballs from raw github URLs
Handle cases where tarball is in the URL query string.
Partial fix for SPACK-48.

- Try to accommodate packages that have grown dependencies better.
- This will only get fully fixed when optional dependencies are supported
  and some extra functionality is added to the spec syntax.