Removed signed-compare warning
Use streambuffer instead of last tot_packet when we have multiple packets

Otherwise, we might encounter some strange cases where we have a
payload but no tot_packet when a gap is advertised by pkt_wait_list
Fix cursor_copy