switch/nrt backport table unload patches

Unload job tables rather than windows at job end. The table unload
also unloads job tables.