Generate our own mipmaps.

Work in progress, it’s a bit messy.
Various changes.

Add options Renderer.textureFiltering, Renderer.anisotropyLevel.
Use textureGrad instead of texture to avoid discontinuity due to
fract().