VPI memory change callbacks: register per element, not per array
To get value-change notifications for unpacked memories/arrays via VPI that work on both Icarus and Verilator, get each element with vpi_handle_by_index(array, i) and register cbValueChange on that element handle (read with vpiVectorVal or vpiBinStrVal to keep X/Z). A single cbValueChange on the array object with cb_data->index naming the element works on Icarus 12 for reg/logic arrays but segfaults there on a wire net array, and Verilator does not report per-element changes that way. Don't rely on vpi_iterate order over a memory either: Icarus returns vpiMemoryWord (30) high-index-last while Verilator returns vpiReg (48) high to low, so index explicitly. Polling every element at cbReadOnlySynch is a portable but O(N)-per-step fallback.
Follow-up: on Icarus 12 an array-level cbValueChange did fire for reg/logic arrays (vpiRegArray/vpiMemory), but a wire net array (vpiNetArray) still needed per-element callbacks. Verilator 5.052 needed per-element for every kind, so per-element stays the portable choice.