TM changes for sending NID on node down and up

TM changes to send node id on a node down and a node up.
JNI changes on C++ and java side.