Fix for deprecated preg_replace
Replace use of deprecated /e preg_replace modifier

Closes http://tracker.modx.com/issues/10056
Closes #17, #20, and #21

Merge remote-tracking branch 'origin/pr/21' into develop

* origin/pr/21:
  Fix for deprecated preg_replace
Replace reflection of PHP_SELF with SCRIPT_NAME in xPDO::log()

See http://bugs.modx.com/issues/10290 for details referenced from http://www.securityfocus.com/archive/1/529372
Fix xPDO::getCount() to work with queries containing group by

Closes modxcms/revolution#513
Resolve xPDO::parseBindings() error from /e modifier fix

Fixes related errors including xPDO::removeObject() errors