Enable regular expressions for contexts

This introduces `ContextPattern`, a regular expression context matcher, for #47.  It also wreaks a little havoc on the SPI.