fcl-db: sqldb:
- do not allocate cursor when opening bufdataset from file
- when closing TSQLQuery do not deallocate cursor while can be prepared (fixes "[SETUP] unable to close due to unfinalised statements" bug for SQLite)
- when unpreparing statement take into account that there are also SQLConnections which does not support [un]preparation of statements ... bur for those we must still call UnRegisterStatement (fixes multiple "[TEARDOWN] Access violation" in tests)

git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@25063 3ad0048d-3df7-0310-abae-a5850022a9f2