Merge pull request #1 from cubejs/master

rebasing
Fixed annoying port of undefined exception during cluster startup.
The problem was related to port check and only master should do the check.
Fixed annoying port of undefined exception during cluster startup. The problem was in port check that only master should do
fixed compile errors and unit tests
updated version
Merge pull request #49 from dimichgh/master

Fixed unit tests, port of null exception during startup, compile errors