cmfs-tools: add follow_link() to libcmfs

This commit copies and modifies follow_link() from libocfs2 to libcmfs.
follow_link() reads inode block which is indicated by inode parameter
and returns it in res_inode to caller.
cmfs-tools: add inode read/write routin in libcmfs

This commmit add 2 routines to read/write cmfs inode block,
- errcode_t cmfs_read_inode()
  copied and modified from ocfs2-tools/libocfs2, read inode block by
blkno and swap it into cpu order before returning to caller.
- errcode_t cmfs_write_inode()
  copied and modified from ocfs2-tools/libocfs2, write inode to the
location indicated by blkno, before calling io_write_block(), this
function swap inode into on-disk byte order.
cmfs-tools: add cmfs_check_directory() to libcmfs

This commit copies and modifies cmfs_check_directory() from
ocfs2-tools/libocfs2.

cmfs_check_directory() reads inode block indicated by dir parameter, and
check inode->i_mode by S_ISDIR(inode->i_mode). If the inode is in
directory mode, return 0; otherwise, return errcode.