Add a test suite to the library

The purpose of these tests is to actually check that the concurrent
pipes terminate properly with all kind of mailboxes if either the
producer or the consumer stops.
This way we can detect these tricky regressions when the underlying
implementation changes.
Fix receiver termination with 'Latest' type mailboxes

Add an explicit internal STM Bool function for all kind of mailboxes
that tells the receiver "should we check if the sender has
terminated?"
For all mailboxes except 'Latest' this function returns true iff the
read would block, that is there is no unprocessed values in the
mailbox right now. But, because reading out the latest value never
blocks, we simply always check if the sender is "done".