Switch to debruijn indices, genericize sub/lub/glb

More refactoring in support of HRTB. There should be no change in functionality from these changes.

r? @pnkfelix 
I think this should be `fn(MetaFuncTuple<&'a int>)` on the rhs