Refactored undo manager support into CBLUndoableModel.
Refactored undo manager tests into separate test case.
Fixed missing nil checks and calls to -willChangeValueForKey:.