remove unused 'offset' member from internal key_value struct

Neither Abel nor I could figure out what its for, and its unused, so byebye
fix sqlfs_proc_write() to allocate a buffer the size of the data to be written

it was allocating a buffer teh size of the entire file before!

refs #553
adjust set_value semantics to work with fixed sqlfs_proc_write

the buffer (value.data) is written into the file between the
range begin/end. the range is relative to the entire file.

refs #553
fix set_value semantics to work with middle and end blocks

refs #553
make test_write_seek_write run at multiple sizes to test block boundaries

refs #553
add test to play with writing around the block boundaries

refs #553
improved write up about how everything is implemented

refs #553
refactor sqlfs_proc_write to eliminate calloc/memcpy for almost all writes

The only time we need to calloc a new buf and then memcpy to it is when the
offset is past the end of the existing file (EOF). Then we need to fill the
space between EOF and offset with 0s, then write buf.  set_value() then
writes that whole thing.

Other cases, we just pass buf directly to read from.  This saves all of the
calloc/memcpy/free/clean_value activity for the vast majority of writes.

refs #553
add semi-colons after every macro for sanity and to make editors happy

technically, this is not needed by C since the preprocessor will generate
the correct code, but it makes editors freak out and just looks stupid.
remove confusing comma syntax in if statements

There is a obscure bit of valid C syntax where you can run a statement in an
if statement, then put a comma, then the actual test.  The result of the part
before the comma is then ignored by the if statement. This is ugly and
unreadable, so I removed it.

fixes #1726
fix when key_exists() in sqlfs_proc_write would not return EBUSY when busy

The annoying comma syntax in the if statement hid this bug.

refs #1726
refactor sqlfs_proc_truncate to use new set_value() to be more efficient

sqlfs_proc_truncate used to first read the entire contents of the file,
then alloc more memory if the truncate extended the file, then pass that to
set_value() to write.  Now set_value() only needs the changed part of the
file, so truncate now only reads the existing size from the file, then only
allocates memory if the truncate extends the file. When it allocates
memory, it only allocates a buffer the size of the extension, not the whole
file.

fixes #553
fix possible buffer overflow in rename_dir_children()

cppcheck said:
[sqlfs.c:2254]: (error) Dangerous usage of 'new_path' (strncpy doesn't always 0-terminate it)
fix cppcheck warnings about reducing scope of variables

This is mostly cosmetic, but it actually seems to have made cppcheck find
more useful problems, like the commit before this one.