Merge/afsql libdbi r

afsql: force to use libdbi 0.9.0 
afsql: use reentrant interface for libdbi