Function prepareUtf8 and allow specifying types of columns

I would like to use direct-sqlite as a dependency in my library groundhog-sqlite. Its optimisations rely on the functions in this commit.