Add an implementation of compress() using itertools.groupby()

There is a function in the standard library, [itertools.groupby()](https://docs.python.org/2/library/itertools.html#itertools.groupby), that does exactly what we need here. This makes it possible to write a very simple solution by simply looping over the iterator that `groupby()` returns. Also, fix and add some improvements to the already-existing `compress()`.