removeDuplicateGradients: Compile at most one regex per master gradient
removeDuplicateGradients: Compile at most one regex per master gradient

Regex compilation is by far the most expensive part of
removeDuplicateGradients.  This commit reduces the pain a bit by
trading "many small regexes" to "few larger regexes", which avoid some
of the compilation overhead.

Signed-off-by: Niels Thykier <a802a5730c0da02a06106670cc12c7838c6e90dc@thykier.net>

scour-project/scour,codedread/scour,Ede123/scour,oberstet/scour