build_haiku_image: filter duplicate packages

Resolving the package dependencies for system might yield packages that
are already given for common. Filter those out of the list for common
before resolving the common dependencies.