Convert _lastLSAVersion and SharedLSADatabase to arrays.
Use explicit new/copy/replace to prevent unguarded accesses from seeing invalid state.
Merge the 3 cleanup-on-shutdown static methods