bridge: Change struct port's active_iface member from index to pointer.
This makes the code easier to understand.
As a historical note, the "bridge" code was originally written in an
almighty hurry, and so some design decisions were made on the basis of
being unlikely to cause serious bugs instead of on the basis of being
easy to understand. That's why there are so many array indexes sprinkled
around the bridge data structures, and so much range checking of their
values, when it would be better to just have pointers that can be followed
directly. I figured that getting the wrong index would at least do
something half-reasonable in most cases, whereas dereferencing a freed
pointer was likely to segfault sooner or later and cause immediate failure.
But now I think it's time to improve the code. The code is mature enough
now that we should be able to thoroughly understand the data lifetime
issues.