normalize_deps.hs: cleanup: by moving helpers to top-level

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>