Make platform independent of context
As the platform instance is stored in a class variable, tests running in the same session might use the same platform instance. This means that test results may be unreliable as they depend on which other tests are run in a single session.
Making the platform independent of the context fixes this issue and it also enables early calls to platform methods. This is required for !726 (merged).