Wire._onHave: don't emit 'have' if peerPieces had index already

This time with a test. In that test I called `wire._onHave()` because `wire.have()` is asynchronous due to piping. That could probably be improved.