elf: do not access objects with preemption disable

program::lookup and program::lookup_addr were written for optimal
performance and look-freedom by using the RCU lock to protect the short
module iteration. However, with demand-paged file mapping, the actual
objects are demand-page, and we cannot assume that object memory can be
read without sleeping.

So switch these functions to use with_modules, the more general, and
somewhat slower, technique to iterate over modules. With with_modules,
the RCU lock is only used to copy the list of modules, and the protection
against the individual modules being deleted is done separately (by
incrementing a reference count preventing any module from being deleted).

This makes symbol lookup a bit slower, but symbol lookups are relatively
infrequent (usually occur during early application startup, the first time
each symbol is used), and measuring Java's startup time, as an example,
I didn't see any measureable slowdown.

Fixes #169.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>