MariaDB: implement `conn_add_query` function

Signed-off-by: swpd <swpdtz@gmail.com>
MariaDB: remember to free the query itself

Signed-off-by: swpd <swpdtz@gmail.com>
MariaDB: add callback for end of query

Signed-off-by: swpd <swpdtz@gmail.com>