Fix MAGN-3732 Curve doesn't update if it was selected using SelectModeElements node.

When an element is deleted/modified/added, the message will be hooked up with the plugin and so Dynamo can handle the message correspondingly and mark the related node as dirty.

In this submission, the following are done:
1). The definition of the message handler is updated with better names and more unified declaration.
2). Ensure the node is marked as dirty so that the downstream graph will be updated when the graph is run again.
3). Ensure the node is marked as dirty for nodes other than the selection nodes.

@lukechurch