Fix context.StatementRef

Resolves #91

Supersedes https://github.com/RusticiSoftware/TinCanJS/pull/94
This added a fair amount of duplication so I've adjusted it in my commit, please review what I did to make sure I didn't miss something that you did here.