Fixed exception when in DEBUG

* If you run syncdb with DEBUG=True you got an exception because CursorDebugWrapper does not accept plain_query parameter
* dbshell client looked for the old database style variables. Copied the new style from django 1.3 mysql client.py