Pkg.generate: fix the generated .travis.yml file.

https://github.com/dcjones/Gadfly.jl/issues/101#issuecomment-27156342

It seems that Travis checks out a specific commit (makes sense),
which, if that commit is tagged as a release, is considered by Pkg
to be "free" and since the package being tested wasn't in REQUIRE,
Pkg.resolve() was removing it, as @dcjones discovered. This fixes
the problem by pinning $pkg first.