Fixes to make Ethernet selftest on 10G solid.

Debugged buffer freelist management i.e. calls to buffer.ref() and
buffer.deref() at the right times both in the 10G driver and in the
port "loopback" selftest.

Memory barrier is now executed in between reading new hardware
register state (e.g. RDH) and writing buffered state to hardware
(RDT). That way memory is in sync before we try to use newly received
packets and before we tell hardware to transmit.