Replace mysql_real_escape_string with PDO prepared statements.
Update PHPUnit and other Composer dependencies.
Disable backing up globals in PHPUnit

This is a Bad Thing as it interferes with test isolation, but since TWFY
is so reliant on globals doing interesting things it is the only way to
make the *current* codebase testable in any kind of depth.

Eventually this should go away.
Disable custom error handlers during testing.