Remove the now-unneeded texture manager.

This also breaks the dependency on layers.

r? @metajack