escaping fixes in MySQL and PgSQL groups handling
integrating opensim-git commits:
6dc1b113d0a7cdf3d7b6d567728d39568f1ed982
d32d25634d0a8d257ed3d05abb9e6c70d086b3f5