cogl-vertex-buffer: Fix disabling the texture arrays from previous prim
cogl-vertex-buffer: Fix disabling the texture arrays from previous prim

When setting up the state for the vertex buffer,
enable_state_for_drawing_buffer tries to keep track of the highest
numbered texture unit in use. It then disables any texture arrays for
units that were previously enabled if they are greater than that
number. However if there is no texturing in the VBO then the max used
unit would be left at 0 which it would later think meant unit 0 is
still in use so it wouldn't disable it. To fix this it now initialises
the max used unit to -1 which it should interpret as ‘no units are in
use’ so it will later disable the arrays for all units.

Thanks to Jon Mayo for reporting the bug.

http://bugzilla.openedhand.com/show_bug.cgi?id=1957

djdeath/cogl,Distrotech/cogl,gcampax/cogl,collects/cogl,djdeath/cogl,collects/cogl,gcampax/cogl,Distrotech/cogl,djdeath/cogl-android,djdeath/cogl,gcampax/cogl,Distrotech/cogl,djdeath/cogl-android,spatulasnout/cogl,Distrotech/cogl,gcampax/cogl,spatulasnout/cogl,djdeath/cogl-android