Extract ResourceManager from StorageManager.
Merge pull request #115 from bastih/resource_manager