Fix receiver termination with 'Latest' and add cabal tests for the library

Hi Gabriel,

Shortly after @errge sent you the pull request #2, which fixed the non-terminating Bounded and Single receivers, I realized that with that fix we introduced another bug. (We did that change together with him.)
With that change we broke the Latest mailbox: receiver never terminates after the sender exits, because we only check if the sender exited when the read operation blocks. And with Latest the read never blocks, obviously.

This change fixes that issue (and hopefully doesn't introduce any new ones). But, I wanted to add some tests to the library, so these kind of regressions could be noticed in the future. (And that took some time, because it's kind of boring and I never wrote cabal tests before. :))