journal: remove journaling support for config

The journaling support for config cannot work well because it causes
deadlock in the initialization sequence of sheep.

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
util: move def_fmode and def_dmode to libsheepdog.a

For avoiding duplicate declaration, this patch moves def_fmode and
def_dmode to libsheepdog.a. The new names are sd_def_fmode and
sd_def_dmode.

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
util: add a new API atomic_create_and_write()

This patch adds a new API atomic_create_and_write(). As the name
implies, the API creates and writes data to a file.

atomic_create_and_write() creates a file path.tmp (path is a
parameter) internally. During the initialization process of sheep,
every user of this API should detect and clean temporal files.

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
sheep: let config use atomic_create_and_write()

Because config of sheep cannot use the journaling mechanism, it should
use atomic_create_and_write() for safe update of its data.

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>