Refactor the remote_node module

Remove the extra 10 second sleep, which was called even before any
contact with the remote node was attempted. So if node is up, the
response is immediate.

Also make sure that the TCPSocket is closed after check,
preventing the leak of file descriptors.
Added event triggers and cleaned the code a little bit
Integrated events into dynamicTables, added compute_node helper, split the json attribute writer for direct access
Merge pull request #801 from bkutil/refactor_remote_node

RFC: Refactor the remote_node module
Merge pull request #841 from tboerger/feature/dynamictables-events

Dynamic table events and JSON writer split