fix uses of uninitilized memory

Thanks to memcheck. (I'm unable to get far with Racket and memcheck,
but I get this far.)

Merge to v6.1.
fix order of file close and kqueue de-registration

Thanks to memcheck.

Merge to v6.1.
fix protected-export checking in `dynamic-require`

The `dynamic-require` funciton was not checking correctly for
re-exported bindings.
fix guard on references to unsafe functions in bytecode

The protection against unsafe-function references was designed for
bytecode that referred to unsafe operations indirectly, and that
was broken when the compiler changed to refer to unsafe functions
directly in bytecode (to simplify JIT inlining bytecode optimization).
Actually, the relevant code (now removed) seems to be pointless,
since protected-binding checking should cover it already. Maybe
something else changed, or maybe the code was not properly checked
in the first place.

Now, `read` rejects a bytecode stream if it contains a direct
reference to an unsafe function and the code inspector is not the
original code inspector. It's still possible to synthesize bytecode
that contains an indirect reference, and then protected-binding
checking does its job.