mesa: factor out enum -> matrix stack lookup

Split this out from glMatrixMode since we're about to need it
independently for DSA.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
mesa: dsa: add selectorless matrix stack functions

Allows the legacy matrix stacks to be manipulated without disturbing the
matrix mode selector.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
glapi: add EXT_direct_state_access

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>