make program a thread-attribute

Instead of relying on a global s_program, make the main program a per-thread
attribute. It will be inherited by each newly created thread from its parent.

This is a preparation patch to support separate ELF namespaces.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
new elf program

This patch introduces a thread method that allows a new program to be created for
the calling thread. The new program is created at a different slice of the address space.
This effectively imposes a lower amount of memory each program can use. But the limit is
still big enough, and should be enough for anybody (tm).

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
expose new run function

This patch creates a new function, run_namespace. It behaves exactly like run,
and takes the same arguments. The only difference is that the program will be
run in a brave new ELF namespace.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
libc: add getifaddrs to run name resolver API for ruby
libc: add freeifaddrs() to name resolver API for ruby