Use MDB2 only. No more mysql_* obsolete functions

mysql_query and similar functions are obsoletes in PHP.
Because we are already using MDB2 in some parts of the code, let's use it everywhere.