[refactoring] Introduced BundleRequiredPackagesCollector, BundleRequiredPackagesResolver