Add the ability to install test dependencies and run tests to Pkg

`Pkg.test("PackageName")` will install a package's test dependencies
(marked with `@test` in the REQUIRES file) then run its tests. If the
tests fail or there is no run_tests.jl provided then an error is raised.
make test a named argument in Reqs.parse
use test/REQUIRE and test/runtests.jl as discussed in pull request
Update docs and clean up test dependencies after running tests

It turns out that doing a Pkg.resolve() after a Pkg.test() cleans up the
test dependencies. May aswell do this at the end of test() as it is
going to happen at somepoint anyway.

Also updated the stdlib docs to cover Pkg.test()
Make sure tests will work after #6205

Pkg.generate() will start creating a test/runtests.jl so need the tests
to cope with that
replace tabs with spaces
remove using Base.Test
move clean-up resolve() into test!
Merge pull request #6191 from burrowsa/master

Add the ability to install test dependencies and run tests to Pkg