tests/normalize_deps.hs: add more realistic example of USE flag: the '?' case

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
normalize_deps.hs: cleanup: by moving helpers to top-level

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Portage/Dependency/Types.hs: changed 'DependIfUse' to accept simpler type as USE switch

Introduced simpler type
    data DUse = DUse (Bool, Use)
      driving (Eq, Show)

To disallow incorrect representations like
    foo ( a b )
 or
    =bar ( a b)

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Portage/Dependency/Normalize.hs: add 'sort_deps' pass

It is able to sort use flags of the following form:
    b? ( a? ( foo ) ) -> a? ( b? ( foo ) )

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Portage/Dependency/Normalize.hs: drop unused code

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Normalize.hs: cleanup: localize visibility of helpers

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Portage/Dependency/Normalize.hs: added new pass 'combine_use_guards'

It is able to merge use depends of the following form:
    a? ( foo )
    a? ( bar )
results in
    a? ( foo
         bar )

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