[Mac] Improvements in the TreeView backend

Fixed flickering when expanding/collapsing nodes.
NSCell subclasses must implement the NSCopying
protocol, since Cocoa makes copies of cells when
doing animations. Added some infrastructure to
make it easy to support the NSCopying protocol.