Address premature socket-close issue in server wait_for_socket state.

This should address #54, where the socket is invalid even before the
server receives control of it.
Whitespace cleanup.
Fix a few dialyzer bugs in riak_api_pb_server.
Narrow that type.
Make the closed-socket test more robust.
Merge pull request #54 from basho/bugfix/sdc/haproxy-enotconn

HAproxy health-check causes node shutdown