Added memory sharing between workers

In node world we need some custom memory sharing between workers. This
implementation uses sharedmemory module. Run npm install sharedmemory
to get it.
Refactoring

Refactoring cluster implementation for better readability and code flow.