Add expr and some internal API

Internal API can be exposed by defining T__DEBUG when compiling, and
before including the headers.

So far strnget just checks for validity, but the full implementation
will parse the expression and build an expression tree from which
various input strings can be matched to.