defrag: don't crash when out of memory

Handle memory allocation errors in defrag better. Could lead to
crashes if malloc errors happened.
http: don't crash when normalizing uri on low memory
ioctl: make all string args const pointers
afpacket: only check offloading once per iface

Instead of once per thread per iface.