Since rule ids are consecutive integers: use an array instead of a map

Likely more compact, faster at both compile time and run time.
Use a C array for the state list, since the size is known at compile time

Big compile time speedup, likely a small runtime gain as well.