add ability to get profile from queries, mvar to tmvar

@AtnNn switching from `MVar` to `TMVar` solves the atomic issue that we would run into on 7.6. `mkWeakTMVar` is not part of the stm lib yet. There is a submitted patch, but is not slated to be accepted until 7.10. I just created a `Utils.TMVar` and borrowed the methods that we use, along with `mkWeakTMVar` and added a `modifyTMVar` akin to `modifyMVar`. All tests are passing on 7.6 and 7.8, and I did not see any performance regressions. Let me know if this works for you or if you have any comments/concerns.