connectx4.lua: use a factory to create HCAs
connectx4.lua: use a factory to create HCAs

A HCA is tied to an initialization segment (i.e. device). The previous
commit mishandled the case when multiple devices are run in the same
process.  This is fixed by creating a factory for HCAs per device.

SnabbCo/snabbswitch,eugeneia/snabb,SnabbCo/snabbswitch,eugeneia/snabb,SnabbCo/snabbswitch,Igalia/snabb,eugeneia/snabb,Igalia/snabb,snabbco/snabb,eugeneia/snabb,Igalia/snabb,snabbco/snabb,Igalia/snabb,snabbco/snabb,eugeneia/snabb,snabbco/snabb,Igalia/snabb,Igalia/snabb,Igalia/snabb,snabbco/snabb,eugeneia/snabb,Igalia/snabb,SnabbCo/snabbswitch,snabbco/snabb,eugeneia/snabb,eugeneia/snabb,snabbco/snabb,snabbco/snabb