Database management bug fixes. Added name field to total.

The old setup_database function can cause duplicate entries to be formed.
The new function checks for duplicates in the python function instead of
rely on sql commands. The bot can also take in a list of terms to be
checked instead of a dictionary. This functionality is untested. Also made
several strutural improvements to the bot class.