netmap: port if_transmit() to ifq_dispatch()

Suggested by: sephe
Always check the limits of array index variables before using them.
route(8): Fix a sizeof bug.