Resolve static initialization order fiasco
Add shared lock abstraction
Discard .ini cache when it's not being accessed

Refs #4193
Use the right prefix for bool variable