nixos-generate-config: Fix PCI/USB checks

As reported by Kirill Elagin, read_file doesn't chomp its output. So
the equality tests on PCI/USB vendor and device IDs were failing.

(cherry picked from commit caf98828bb2f8d40448ca3a6782b881a0f2cec58)