Added debug code for a couple of queries to help track down a bug.
Fixed MySQL code so that everything works when using the `utf8mb4` MySQL charset (as is now the case with later versions of kode54's Quassel-MySQL patch).