until just _before_ exitDatabase, to ensure
that cleanup happens _after_ devSup detach().
Still allows devSup build() the opportunity
to add epicsAtExit() which happen between
cac cleanup and our cleanup.
Add in registrar happens early in startup, and
will be run near the end of shutdown.
Even if iocInit() isn't run.
Also use an initHook to add cleanupPy(), which
happens late in startup, and will be run early
on shutdown. Though only if iocInit() is run.
Py_InitializeEx(0) tells the embedded interpreter to not install signal handlers. This fix is ignored by Python <3.7. See https://bugs.python.org/issue35233.