Fix a logic error in post, put, and erase where invalidation of weak_ptr to transaction in the stack results in noop

Now use an assert to check for correctness
Merge pull request #359 from digawp/internal-ds-refactor

Minor bug fix to DataStore