refactor example/c/lib_buffer_unpack.c
refactor example/c/lib_buffer_unpack.c

The example has some duplicated code that somewhat distracts from
the main processing loop. I think placing this into a separate
function improves readability of the code.

kern/msgpack-c,kern/msgpack-c,GamePad64/msgpack-c,GamePad64/msgpack-c,kern/msgpack-c,GamePad64/msgpack-c,kern/msgpack-c,GamePad64/msgpack-c,GamePad64/msgpack-c,kern/msgpack-c