Add conditional-put support to avoid the lost-update problem when writing a new server config file.

BUG=skia:

Review URL: https://codereview.chromium.org/805043003