use std::stack for the matrix stacks

really no need to roll our own here
remodel ScopedMatrixPushPop as MatrixTicket, since its so similar to StateTicket