• Refactor and improve the texture cache implementation.

    * The texture cache now acts more like a traditional cache,
      where the cache is a fixed size, and can evict items as required.
    * The allocator is switched to a slab style allocator, allowing
      deterministic behavior when allocating and freeing.
    * The slab allocator does not suffer from fragmentation like the
      previous allocator, and has no coalesce requirements.
    * The eviction policy is a lot smarter than the previous implementation.
      Items are evicted from the cache as required, and not before.
    * Since the shared cache is a fixed / bounded size, any allocations
      that are too large for the cache are created as standalone textures.
    * In the rare / edge case of the fixed sized cache being full, and
      the cache not being able to evict items, these items also fallback
      to the standalone texture allocator.
    * All textures using the sColor* samplers are now array textures.
      This will allow us to simplify the large image tiling code in
      the future.
    * All texture updates are performed via PBO, to eliminate CPU
      driver stalls when updating textures.
    gw3583 committed Aug 14, 2017