updated for new netmap API

The NETMAP_* macros and the use of ring->avail are no longer compatible with the latest netmap (compilation fails). The sample code in the latest netmap uses the nm_* functions instead. Updated libnetmapif accordingly.