afsql: use reentrant interface for libdbi

The reentrant interface is released in a public version of libdbi[0.9.0]

Signed-off-by: Budai Laszlo <lbudai@balabit.hu>