Support custom IDeref and IPending instances

Closes #9
Merge pull request #10 from brandonbloom/custom-refs

Support custom IDeref and IPending instances