feature and fix for 500 on group missing
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/3352
And maybe https://gitlab.com/gitlab-org/gitlab-ce/issues/5600 (looking into this one now, as it may require a different fix).
With the fix it will return a 404 if a group is not found. Added relevant feature.