phpunit support

This is a quick hack to get phpunit support.
Only translated a single test, but moving all those seems like trivial once the architecture is stable enough.

Things to improve:
- `test/boot.php` and the whole PDO connection management.
- cleaner `create/drop tables` on each tests (they should leave database state the same as they found it)
- fully migrate all `phpt` tests