Remove unnecessary header includes.
Simplify sort_dir, use existing string array lib.

Also fixes a memory error.
0x is already prepended to pointers libc.

At least with every system I've worked with.
Only copy out bytes from recvmsg.

Fixes a valgrind error.
Organize headers.
Use poll to allow fd >= 1024.

Peter Onyisi reported an issue using Parrot running Athena. Parrot would enter
an infinite loop polling on file descriptors.

This infinite loop is caused by Parrot setting file descriptors above 1024
(FD_SETSIZE) in the file descriptor set used by pselect. It ultimately causes
undetectable memory corruption (via valgrind) as well as file descriptors which
would never receive an event.

This commit corrects this through the use of poll. [Note: since Parrot is Linux
only, we don't need to be concerned about the portability of the use of poll on
other Unixes.]

Fixes #340.
Correct memory errors in Parrot.

* pull-341:
  Use poll to allow fd >= 1024.
  Organize headers.
  Only copy out bytes from recvmsg.
  0x is already prepended to pointers libc.
  Simplify sort_dir, use existing string array lib.
  Remove unnecessary header includes.