Changed the constructor of the Resource class to take a weak_ptr to a ResourceManager. This can be used in case the Resource depends on other resources (a configuration file specifying an include file, etc). This change makes it necessary to create ResourceManager as a shared_ptr, as if the user calls cache() on a stored Resource instance that has dependencies, it won't be able to cache those if the ResourceManager has been destroyed.