types: fix duplicated policy rules
types: fix duplicated policy rules

When an user import the same policy twice or more times, the same set of
rules where imported to the policy tree making duplicates of the same
rules.

The SHA256Sum function on a PolicyRule allows to verify if the rule
already exists in the Rules slice.

Acked-by: Thomas Graf <5f50a84c1fa3bcff146405017f36aec1a10a9e38@cilium.io>
Signed-off-by: André Martins <bc9800b9d52a24cce72a73dd528afed53f10e5fc@cilium.io>

ivar-lazzaro/cilium,cilium-team/cilium,scanf/cilium,gumpt/cilium,tklauser/cilium,gumpt/cilium,tgraf/cilium,tklauser/cilium,cilium/cilium,cilium/cilium,scanf/cilium,michi-covalent/cilium,tgraf/cilium,tgraf/cilium,eloycoto/cilium,scanf/cilium,eloycoto/cilium,cilium/cilium,tklauser/cilium,michi-covalent/cilium,scanf/cilium,eloycoto/cilium,ivar-lazzaro/cilium,gumpt/cilium,michi-covalent/cilium,gumpt/cilium,ivar-lazzaro/cilium,gumpt/cilium,michi-covalent/cilium,cilium/cilium,gumpt/cilium,tgraf/cilium,mskarbek/cilium,scanf/cilium,tklauser/cilium,mskarbek/cilium,tgraf/cilium,ivar-lazzaro/cilium,michi-covalent/cilium,mskarbek/cilium,mskarbek/cilium,ivar-lazzaro/cilium,eloycoto/cilium,ivar-lazzaro/cilium,gumpt/cilium,mskarbek/cilium,scanf/cilium,eloycoto/cilium,mskarbek/cilium,eloycoto/cilium,cilium/cilium,tklauser/cilium,cilium-team/cilium,tgraf/cilium,scanf/cilium,eloycoto/cilium