Fixes for Linux implementation

- Platform::getHostAddress implementation has been split according to whether
  the lib is being compiled for __APPLE__ or not. This is because macosx can
  have variable length records, and linux looks to have fixed length records
- Socket and MulticastSocket now shutdown input/output before they close the
  socket descriptor to prevent a hangup.
- Added newlines at EOF to keep gcc happy
- Platform::getRandomBytes now reads from /dev/urandom instead of /dev/random
  to prevent blocking if the system entropy pool has drained