bug fix for issue 1739

Two changes included:

* fix typo in OC_Group_Database::DisplayNamesInGroup's SQL clause
* check `array_diff` return value in OC_Group::displayNamesInGroups,
  when there is no difference between two arrays, it will return
  NULL, so we have to take care of it.

This PR fixes #1739

//cc @karlitschek