Finished adding database foreign key support and removed temporary workaround.

This update should finish fixing the issue where the database was not enforcing foreign keys and ignoring the ON DELETE SET DEFAULT constraint.  It also removes the temporary workaround which involved manually updating the word table anytime a theme was deleted.

Let me know if you run into any issues, especially when running on Linux or a Mac.

Thanks,

Mike