Replaced raise by SC.Logger.error
Makes cachable some properties
Refactors SC.UndoManager
Adds unit tests to SC.UndoManager