PCI: Fixes capability detection

Caps are a linked list; the old code seemed to just incrementally scan,
which was checking arbitrary spots in the PCI/cap space.

If someone wants to make fancy cap_id-to-strings for the output, be my
guest.