feat(nickel): Support for sharing data between requests per route basis.

My attempt at issue #79.

This is mostly non breaking. As far as I know, nothing will break unless people were implementing `RequestHandler` for something else than the default implementation. I don't think anyone did though.

The new feature is that it is possible use a handler signature like `fn root_handler (_request: &Request, response: &mut Response, route_data: &RouteData)`, and then register it with the router with `server.get_with_data("/", root_handler, RouteData{...});` as can be seen in the new example I've added. 

This has many usecases, many of which required a middleware before. In the new example provided I count how many hits a route has gotten. One could also store a database connection in there, as is the example in issue #79 where this comes from.

I've been fighting the compiler with this for some time so some refactoring that I can't spot right now might be needed, point out anything you find! We might also want to discuss the naming of the new router methods (`get` - `get_with_data` and so on) and come up with something that feels good. =)
Check #111, merge that if you agree it's correct!
On 5 Nov 2014 16:34, "Simon Persson" <notifications@github.com> wrote:

> In src/router/router.rs:
>
> >          let matcher = path_utils::create_regex(path);
> >          let variable_infos = path_utils::get_variable_info(path);
> > -        let route = Route {
> > +        let route = box Route {
>
> Ah, that's nicer. Don't know why I didn't think of creating a trait for
> the handler/data combination to begin with. I'll fix it, but at the moment
> groupable-rs seems to fail so I can't really work on it.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/nickel-org/nickel.rs/pull/108/files#r19885472>.
>