match: simplify match implementation

This decouples match internals from the spec which makes different
specs an option eventually leading to (almost complete) static
specification of an analyser.

Signed-off-by: Peter Williams <pwil3058@gmail.com>