Rewrite survey dump to use xlwt and be more efficient.

I'm pretty sure this version actually does all the database stuff right!
Famous last words....