Double Management and Entity Select optimizations

Updates to the entity select process allowing for "Actions" (in the form of stack frames) to be executed. Actions allow apps to define alternate workflows to follow from the Detail Collection screens (for instance, registering a new Patient when you can't find one).

This PR defines the new Data Model for actions, and updates the stack processing to disambiguate how certain sessions should be managed when the stack is updated.

It also adds the appropriate hooks for processing those actions in j2me, although the actual UI for stack actions isn't exposed yet.

This PR also splits out the case db optimizations into a more general Storage root object for performance reasons

NOTE - The "other" commits are actually commits that are part of CommCare trunk, they are currently only tracked as individual commits on the 2.13 branch due to an artifact of the migration process. 

The "Files changed" is the most accurate way to review the PR. 
Confused by the purpose of this class, and I don't see it used anywhere...?