Add test for StateT's apply function

This test makes sure the effect of the lhs argument only got applied once.
Merge pull request #107 from yunxing/master

Add test for StateT's apply function