SERVER-15512 add lock to protect legacy initial sync flag access