support for user defined queries to the mysql plugin

This patch adds support for query statements to the mysql plugin. It's inspired by dbi plugin and uses auxiliary functions from utils_db_query. Any comments and suggestions are welcomed.