First step to support join against an internal store in scalding

The meat is not here, but probably half the work (and none of the tests).

@ianoc and @egonina Can you take a look and give feedback?
before we were inlining this rule (see below) and we were copying code.