Implements split, splitBy

Took a crack at #6, based quite a bit on dominictarr's [split](https://github.com/dominictarr/split). I broke it into two methods to avoid optional parameters.