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). Checked for direct references to database.php and couldn't find any usage of it in core. Likelihood of users referring to the file directly, bypassing the manifest seems unlikely enough.