Working on range library.

Integrating some ideas from Eric Niebler's range library.
Adding function library to core.
Adding sentinel branch.
Use the right mem_fn constructor.
Implement, test for_each.

Make invokable return exactly the category of value given so
that modified state is retained when returned.