fixed offset handling in struct packet

the staging buffer handling is properly done for the fields of struct
    packet. all allocations from the staging buffer is only done through
    calls to staging_buffer_init so we can properly track where the
    strings are in stringtab and where the option arrays start after
    the start of the packet.

minor bugs in packet handling were fixed. we are supposed to check if
    the payload is already SMALLER than or equal to the bytes actually
    read from the socket.

the read data is now put in a dynamic buffer with the proper size prior
    to processing because the read buffer is static and would get
    clobbered from the next read.
keep calling waitpid until there is no more child waiting

can we ever see this happen? maybe i should put the waitpid loop in a
    separate thread?
Merge branch 'next'

many fixes for packet handling