WebBridge.findModem() iterated _G.device with pairs() which has
non-deterministic order. On computers with both wired and wireless
modems, it could return the wireless modem while the manager uses
a wired modem - messages never cross the wired/wireless boundary.
Now uses two-pass iteration: first looks for wired modems, then
falls back to any modem. Peripheral scan fallback also prefers wired.
Backward-compatible: boolean arg (preferWireless) still works.