Restore test database similar to how dev database is restored

Now dumps test database as well.
Removed logic for using structure.sql and rake db:test:prepare.
This improves performance quite a bit.
Refactored restore logic into separate method.