Make CGIT an instance of MonadMask

This patch makes CGIT an instance of MonadMask, which is useful because you can use `bracket` in CGIT monad, for example.