Add mtl instances for MonadReader, MonadWriter and MonadState.

Please double check the implementation of MonadWriter makes sense.