Refactoring generated Java code.
Fixed duplicated calls to WKPF.registerWuClass that were generated when a node contains multiple instances of a virtual WuClass.
Fixed bug: the mapper should only consider native wuclasses to be on the node. If a virtual wuclass is there, it will be gone after reprogramming unless the master generates code that recreates it.
Moved registering virtual wuclasses to the beginning of Java main() function and reintroduced WKPF.isLocalComponent. To make group stuff work later, we have to change the implementation of getPortNumberForComponent to return the port for the component on this node, instead of on the leader node.