static object destruction order bug fix

Apparently on windows globals in the executable can be created before
and destroyed after globals in a linked DLL. This means that Halide and
LLVM don't really exist during the construction and destruction of
globals. Yech.

So we A) prevent globals that get created before the small int cache
from using it.

B) Remove an unused global param objects (which touched the small int
cache during its construction)

and C) manually clean up some global Image objects that are attached to
JIT-Compiled modules. LLVM tries to lock a destroyed global mutex when
you delete an execution engine.