New: CPTextField now supports the CPEditorRegistrationProtocol

previously, changing the selection of a CPArrayController whilst editing a bound text field could result in losing these edits.
this PR makes the textfield invoke the objectDidBeginEditing and objectDidEndEditing appropriately.
additionally, all dirty changes are committed before the selection changes.

fixes issue #1435