bcosca/fatfree — pull request #370 by ikkez (2013-06-24 09:20:21+00:00)
Title: mapping to first and last record in cursor.

When we use `$mapper->last()` it will move the pointer to the last record, yes and returns that mapper object correctly. But it misses to make that record the active document for the mapper itself. This done by `skip()` in all mapper implemantations of Jig, SQL, and Mongo Mapper... but since Cursor `last()` and `first()` are just moving the pointer instead of skipping to them, the active ducoment stays the same, even if the pointer has moved.

This fix now uses skip to move and map to the last and first record of a cursor set.