This fixes a bug where delete[] would be called on a bytearray buffer allocated by MicroPython on gc_heap.
Adds an ifdef guard around `pio_sm_unclaim` that prevents it being called when MicroPython cleans up/finalizes classes. For some reason this appeared to be causing a hardfault.