refactor packet_parser

add tests and benchmark,
100% speed improvement (packet_parser only, not integral)