Fix iflib software pkt/byte counters to work properly with TSO. The current software based counters count packets and bytes sent down to the driver, but does not account for the inflation of packets/bytes when using TSO. To account for this, we must calculate the number of segments the NIC will transmit, and multiply the header size by the number of segments transmitted to arrive at the total bytes sent.
To do this, move the calculation into iflib_encap(), where we have already parsed the packet and know the header size, etc.
I noticed this when moving an out-of-tree NIC driver for a NIC with unreliable HW counters to using iflib SW counters.