Replicate method and event listener changes

@eric79, this is the two existing PRs,

  - Replicate method changes  (https://github.com/virtual-world-framework/vwf/pull/276)
  - Replicate event listener changes (https://github.com/virtual-world-framework/vwf/pull/292)

plus the `preserve-script-closures` compatibility option, and method and event listener replication tests.

`dispatchEvent` offers the event to every node from the root down to the target node (at `nodeID`). The parameters can vary with each node. For example, for a mouse click you might want to send the click location in the frame of reference of each of the intermediate nodes.

The argument list for the listener call consists of the values from `eventParameters`, and if `eventNodeParameters` contains an entry for the specific node, the values for that node from `eventNodeParameters`.