[SysApps] Move the Promise implementation to a module

So it can be shared with other APIs.