Migrate the instance store to typescript + immer
This MR aims at migrating the instance store to immer and typescript.
- On migrating, I noticed that the reducer for 'EXPORT_INSTANCE' did not update the store, so I first extracted the code from the reducer to move it in
I draft the MR to address the simplifications of the store step by step. @bnjbvr the mr is not yet ready