Added an initialize_state method to context_impl.
Removed the state::active_matrix_stack method since each matrix stack size needs to be compared with the appropriate cap.