Pass the device's hardware IDs through modem creation and use them when calculating the device's identifier. Add a bunch of testcases for real hardware to ensure we don't break the device ID in the future unless we really want to.