Pdo firebird fixes

Fix and tests for bugs #64037 and #62024 (related to the pdo-firebird module).

These are my first contributions to the php core, so if I messed up something, let me know.