fix functional test script to detach loop device

When I run test case 054 and 057, there will be error like:

	057 Last Used:11s.  Test md hot-plug and hot-unplug - output mismatch (see 057.out.bad)
	--- 057.out	2013-11-20 11:04:05.405938952 +0800
	+++ 057.out.bad	2013-12-16 14:54:07.045241449 +0800
	@@ -1,30 +1,33 @@
	 QA output created by 057
	 +mount: could not find any free loop device
	 +mount: could not find any free loop device
	 +mount: could not find any free loop device
	  using backend plain store

The reason is _cleanup_devices only umount but not detach loop devices. So
I add these detach operations.

Signed-off-by: Robin Dong <sanbai@taobao.com>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
sheep/http: merge the calls of sd_inode_write_vid() in oalloc

Function sd_inode_write_vid() will write all meta-data of sd_inode to disk even
its name is 'write_vid', to fix this confusion, we add a new function
sd_inode_write() to do this job and just let sd_inode_write_vid() call it if the
type of sd_inode is B-tree.

Then, we don't need to call sd_inode_write_vid() many time when alloc blocks
in oalloc_new_finish() but just call sd_inode_write() one time after set all
vids.

Signed-off-by: Robin Dong <sanbai@taobao.com>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>