F/dbparser testing

This branch refactors the dbparser unit test program to make a bit more readable and also contains dbparser
refactors.
well, I wouldn't call it a cache. it is the state entry for the rate limit functionality of patterndb actions.