elf: Support on-load symbol resolution

Normally, symbol binding in shared objects is lazy, using the PLTGOT
mechanism. This means that a symbol is resolved only when first used.
This is great because it speeds up object load, and also allows us never
to implement symbols which aren't actually used in any real code path.

However, as issue #256 shows, symbols which are used in DSOs from a
preemption-disabled context cannot be resolved on first use, because
symbol resolution may sleep. Two important examples of this are
sched::thread::wait() and sched::thread::stop_wait(), both used by
wait_until() while it is in preempt_disable.

This patch adds the missing support for the standard DT_BIND_NOW tag.
This tag can be added added to an object with the "-z now" ld option.
When an object has this tag, all its symbols should be resolved on
load time, instead of lazily (when first used).

Bug #256 can be fixed by linking tst-mmap.so with "-z now" (this will
be a separate patch).

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>