Remove old mysql_ cache purging code, fix type inconsistency bug in cache purging, and fix a bug in the debugger (oh, the irony)