sqlite3: make it possible to set text_factory upon initialization

hi,

see attached changes with including tests ..