Destroy cached textures when system runs out of resources

Signed-off-by: Jorge Ruesga <jorge@ruesga.com>