added set-read-only, set-read-write, and wait-until-stable functions to improve coordinator stop procedure