WIP: BaseRecurrent and recurrent_apply_method

The scan related code is a typical boilerplate code
of which we had so much in Groundhog. This commit
introduces a way to get rid of it: a decorator that adds iteration
code to a single-step transition function.
Agreed. I personally like to stick with list comprehensions instead of `map` and `filter`, just for consistency sake, and because I find them more readable for people who don't know what `map` and `filter` do, but I can live with them if you want to keep them :)