Updates Port Matching Algorithm

- More or less just some code cleanup to make things a bit nicer and less
  explosion prone (ie arguments should not get checked on non-messages now)
- As an added bonus it appears under some sets of compiler flags this new code
  runs at double the speed of the old one. I guess that gcc doesn't like state
  machines encoded as goto based jump tables :p