MySQL foreign keys. Tokenized MySQL calls.

Moving from "username" (string) to "worker" (int) in shares tables -
foreign key enabled.
MySQL calls now use dictionary's for values rather than just %s.
Started code reformatting of all classes.