Closed #3284: Refactoring TMXLayer for better performance

Add sub cache canvas to reduce the cache size, cache is used only when
user’s layer is too big, otherwise use default version.