Fixed the issue of the default database not being imported.

Fixed a bug in the SQL database pertaining to the use of grouper.
Made SQLDatabase pickleable, for better multiprocessing support.