Use -z as condition on running setup

Ensures that all files after the first out-of-date file will be run.  Correctly
sets up using the condition in the Rakefile.

Note the trick of using a .tmp file and then moving the file into place upon
success -- this allows the -z to function correctly with the log file (if the
same file is used then there is a race condition between -z and > where > can
update the mtime before -z gets to it, thus making all files up to date).
Moreover it makes `rake all` re-run the setup in cases of failure, so wins all
around.
Update psql adapter to exit on error

This is the correct default behavior.  It makes no sense to continue on error.
Also fixes an issue when streaming with echo (echo should win).
Add reset functions/procedures to test databases

The idea is to use these to reset the database between tests.