Problem: memory leak in s_accept_reply

Solution: free reply string properly.
Problem: was incorrectly processing replies from actor

Solution: flush socket after each reply, not inside loop.
Minor debug output fix
Problem: was not setting chunks in sendXxx calls

Solution: set chunks correctly on sending
Whitespace fixes
Problem: router socket isn't getting ID frame

So messages get lost.

Solution: store routingId in msg before sending, if we're using a
ROUTER socket.
Merge pull request #118 from hintjens/master

Various improvements, mainly to Java codec generator