sheep/vdi: fix vdi snapshot deletion

This fixes tests/func/044,046 failures and add some comment.

Signed-off-by: Liu Yuan <namei.unix@gmail.com>
util: add typesafe nbsearch macro

- sd_inode make use of it
- simplify some compare functions

Signed-off-by: Liu Yuan <namei.unix@gmail.com>
util/sd_inode: structure and function renaming

There is actually no extent at all in the implementation btree, it is
traditional index and indirect index. So better name it as it is.

And refine some comments.

There are still some remnant variables that is extent related and hope we can
get rid of them completely for future refactor this sd_inode.c

Signed-off-by: Liu Yuan <namei.unix@gmail.com>
util/sd_inode: kill {set,get} macros

users of these functions should not bother with writer and reader and simplify
the parameters of internal functions a lot. Make them as functions also
explicitly namespace them as 'sd_inode' helpers for better maintainability.

Signed-off-by: Liu Yuan <namei.unix@gmail.com>
util/sd_inode: kill icache_init()

Signed-off-by: Liu Yuan <namei.unix@gmail.com>
util/sd_inode: add sd_inode_index_walk helper

This is more easier for callers to understand what it does instead of calling
a internal btree walker.

Signed-off-by: Liu Yuan <namei.unix@gmail.com>