UnionOfRAD/lithium — pull request #477 by jails (2012-05-23 20:15:37+00:00)
Title: Refactor collections and results classes for better consistency and fix some issues.

Sorry for the big PR, but it's was hard to untangle this and break down this PR in several parts.
The previous version of Document/Record management was almost perfect but some inconsistencies make it difficult to extend.
- Result classes has differents behavior. Some return the first item on a next() call and others return the second item (like PHP next()). Mocked classes sometimes also doesn't respect the correct behavior of the class they mock.
- Tests have been added to RecordSet to manage composite primary key
- DocumentArray and DocumentSet are here merged to be the unique DocumentArray class
- Solve #418