CHG - Refactored sql_query() for marginal gains.  Does not loop through each column of each row if mysqli connection in $mysql_verbatim_queries mode (instead copies entire row).  General tidy up too.

git-svn-id: http://svn.montala.net/svn/resourcespace@5988 c08608d7-6e46-0410-86ca-f2a6f1370df5
NEW: hooks additional_plugin_columns and additional_plugin_column_data

git-svn-id: http://svn.montala.net/svn/resourcespace@5989 c08608d7-6e46-0410-86ca-f2a6f1370df5