Task #570: tracking: memory fragmentation
pattern id: rewrite pattern id assignment
assign pattern id's at later stage.
at that point we'll know how many we have so we can work with an array instead of current hash table
should safe a lot of malloc's. 10k+ on a large ruleset