Add submodules mbs and platform.
Remove old mercurial submodules.
Ignore generated files.
Use the new platform API.