'connectToMaster()' wait for client

Also, added more items to "TODO: Planned functionality" for
'connectToMaster()', the slave shall close the socket upon error and
log the error
Correct 'bind()' sanit-check

Sanity-check for 'bind()' now considers '0' a valid file descriptor
because errors are indicated by '-1'

Also, 'closeSockets()' only close file descriptors if they are > 0
'connectToMaster()' close socket if failing to bind
Rename 'closeSockets()' -> 'closeSocket()'

Although two file descriptors are closed, from the caller's perspective
it makes more sense to talk about it as a "socket"