Master: Increased paranoia when indexing modules.
Some modules (like eg Calendar.Events) have overloaded lfun::`->()
operators that have side-effects (like eg compiling other modules).
This is usually not a good idea in many places that attempt to look
at symbols like is_resolv_dirnode and is_resolv_joinnode.
Switch to instead indexing the corresponding program for the object
in an attempt to avoid surprises.
Fixes [PIKE-61], where lfun::`==() in joinnodes triggered compilation
of Geography.Countries when they were compared with Calendar.Events.