Asynchronous Cached Entities

Hooks to allow entity caching, and to separate out procedurally loaded elements from storage backed data trees so that platforms that have the ability to batch query can utilize it.

X-Requested: CommCare, JavaRosa

Relies-on: inline_entity_tiles
This loop is confusing: the if (keyMapping != null) block shortens keysToFetch, but the else depends on getNextIndexMatch to shorten it, and the comment for getNextIndexMatch implies that it doesn't necessarily remove anything. I'm not sure if it's just a matter of tweaking comments or if this should have fallback code in case getNextIndexMatch doesn't shorten the array.