Separate out SS_Query and MySQLQuery from their Database classes

Coding conventions state one class per file (unless it uses an _ to indicate related classes.
Merge pull request #2688 from wilr/spiltclasses

Separate out SS_Query and MySQLQuery from their Database classes