New: Added CPWindowDelegate protocol

Added CPWindowDelegate protocol
Also, now, delegate methods are called as we are used to do it in Cappuccino
Fixed: wonrd params for the method _sendDelegateWindowWillReturnUndoManager
Merge pull request #2094 from Dogild/CPWindowDelegateProtocol

New: Added CPWindowDelegate protocol