Fixup Expression/NFExpression variable usage

A few commits ago, I made it so ExprVariable does not inherit from
boolfunc.Variable. This turned out to be a mistake. Aside from fixing
that, I did a bunch of refactoring of how uniqids are used.