refactored the code that builds a semtrex for matching definitions out of receptors into defs

used this to test our creation of an HTTP_REQUEST tree (and fixed the bugs found in the mean time)