implement detection of duplicate packets to catch and avoid forwarding loops

fixes #20