Implemented CocktailSorter

Implemented the CocktailSorter algorithm. This resolves issue #4