Try to fix swift problems

DO NOT MERGE YET
* Make FastI2I more thread-safe
* (TODO) Make swift to restart correctly after crashing