Implement packet cache

Limits packet allocation using a cache.
Previously every packet received and sent was allocated and then freed.
Reusing them reduce allocations.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Do not add MARS packets to list

Sending data cause all acknowledged mars packets to be queued however
these packets are not freed until client start receiving some data.
For large loading into database this could queue lot of packets
spending quite lot of memory. As packets are already handled anyway
put then on cache instead.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>