Need to get rid of all those unmanaged allocations and present game data in an easily serializable form.
This adds a managed TPointer class that replicates the useful parts of std::unique_pointer but steers clear of its properties that often render it useless.
* made it palette aware
* use backend facilities to track precached data.
* fixes bug in animation precaching loops - they only precached the base index over and over again.