Simple test suite. TODO: Use QuickCheck.
Added QuickCheck tests.

Changed behavior of peek: peek is now peekr and peekl. In case of elements occurring at the same time, peekr will return the rightmost in the list (corresponding to the limit coming from the right), and peekl the leftmost.

computeEnergy is now correct even when elements occur at the same time.

To run the tests:
cabal configure --enable-tests
cabal build
cabal test
Merge commit '028b297d32869c9f1043eb374c0ab96e78393557'