Deduplicate dependency checks

Some code that I also used for https://github.com/owncloud/administration/pull/11
You probably don't want to add an array with only one element, but want to add the element itself instead. That would be `$missingDependencies[] = $module;` and you can use `$missingDependency` instead of `$missingDependency[0]` below.