Make some strings more const, initialize members, and abort if lock initialization fails. Partially found via clang-tidy.