Give distarrays id's to make them a bit easier to identify.

Fix destructor issue (a reference was being kept to the array
in a closure, which then revived it, forcing it to be deleted
again and again).

Nonblocking wakeup pipe.