Refactor resource managers
Resources (texture, shader, object for now) inherit a Resource class,
which provides basic shared resource functionality
(Object::get(key), Object::clearUnused(), etc.)
Also some cleaning up, and a new Path class (instead of keyFromPath(str))
Put cell-loading code in Cell class
Also added an explicit cast() function for scriptdata
Fixed crash related to destroying physics objects
Components use the "Resource" template now
Makes things a bit cleaner
Also do some proper cleanup in main now that we're actually destroying objects
I'll probably edit Resource so it can use (or uses by default) std::unique_ptr