Redesign of resource management.

This adds resource managers for framebuffer and textures.