Caqti_query: Add prepare_sql and fix prepare_all.