add GenericSTM class and some non-concurrent tests for it