Instead of using the sometimes-broken intra-Ref locking use an explicit lock. Closes #24
Merge branch 'taexp' of https://github.com/ValeevGroup/mpqc into taexp