net: stats: do not use deallocated packet pointer
net: stats: do not use deallocated packet pointer

Functions for per-interface statistics collection used a pointer to a
packet that could've been deallocated in the net_conn callback function.
In result, application could crash when interface related to the packet
was referenced. To fix that, packet interface is stored earlier, so it
can be used instead for statistics collection.

Signed-off-by: Robert Lubos <9d28997c6894a2d0321a7bb399169af7ce99b64e@nordicsemi.no>

nashif/zephyr,galak/zephyr,kraj/zephyr,explora26/zephyr,mbolivar/zephyr,punitvara/zephyr,Vudentz/zephyr,zephyriot/zephyr,punitvara/zephyr,ldts/zephyr,Vudentz/zephyr,explora26/zephyr,GiulianoFranchetto/zephyr,Vudentz/zephyr,explora26/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,zephyriot/zephyr,galak/zephyr,mbolivar/zephyr,ldts/zephyr,GiulianoFranchetto/zephyr,galak/zephyr,punitvara/zephyr,mbolivar/zephyr,GiulianoFranchetto/zephyr,nashif/zephyr,mbolivar/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,GiulianoFranchetto/zephyr,ldts/zephyr,explora26/zephyr,mbolivar/zephyr,zephyrproject-rtos/zephyr,zephyriot/zephyr,punitvara/zephyr,kraj/zephyr,ldts/zephyr,finikorg/zephyr,zephyriot/zephyr,punitvara/zephyr,finikorg/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,kraj/zephyr,nashif/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,explora26/zephyr,GiulianoFranchetto/zephyr,Vudentz/zephyr,kraj/zephyr,Vudentz/zephyr,galak/zephyr,ldts/zephyr,galak/zephyr,nashif/zephyr,zephyriot/zephyr,kraj/zephyr,finikorg/zephyr