Calculate used bounce buffers in amd64 bus dma correctly.
There was an off-by-one bug when comparing the used pages for bounce
buffers with the available pages. As a result _bus_dmamap_load_buffer()
returned ENOMEM although there was one buffer left.
Also the _dm_nused field was updated and never reset in case of an
error. Use a local variable to count the used pages and update
global map->_dm_nused only if _bus_dmamap_load_buffer() was successful.
This fixes hanging network transmits if bounce buffers are enforced
for vio(4).
OK sf@ hshoexer@