Can call multiple times resolve for a given module

Fix a bug where calling multiple time resolve for a module not yet
registered would incorrectly detect a circular dependency.

Also always return a promise now, that was not the case when the module
was registered with registerAndExport.