Move static treeNodeCache from SHAMap to the Application

These changes address two JIRA issues:

 - 291 unittest reported leaked objects
 - 292 SHAMap::treeNodeCache should be a dependency injection

Great question.  FullBelowCache::size() returns a size_type, which is typically unsigned.  So I think the cast is required to keep the same behavior.  But I'll change the c-style cast to a static_cast.