Fix testFreeHeapPercentagePolicy test

closes https://github.com/hazelcast/hazelcast/issues/3894

Includes:
- Adds an abstraction layer with `MemoryInfoAccessor` to `java.lang.Runtime` so we can easily mock it when testing heap policies.
- Relevant refactorings.