Introduce MemoryPolicy API

Part 1 of #438 
Need a null check here for assholes like me who like breaking code.
```java
memoryPolicy(NO_CACHE, new MemoryPolicy[] { null })
```