Rewrite scraperwiki.sql to use sqlalchemy

Big rewrite, eliminates dumptruck, brings performances benefits and correctness improvements in various circumstances.

Also enables us to use non-sqlite database backends (in theory, but untested).

I'm happy to call this "done" and merge the pull request, but we need to do some testing in the while before releasing it for good.