Added save() and restore() commands for saving and restoring the matrix

This is modeled after the canvas save() and restore() methods.