make config accessor work with read-only reference

bonus point: config getters are now automatically thread safe