more opensim.mysql.php functions modified for use with SimianGrid, but still incomplete
and other minor bug fixes