Pointer based message queues.

Fix primes example to use these.