Add -[CoreDataRelation group:] for sectioned data

Returns an array or arrays, for use, e.g., with a table/collection view.

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Add sectioned data helpers to ObjectiveRelation

Makes it easy to use an ObjectiveRelation as a data source.

E.g., with the following property:

  self.people = [[Person order:@"lastName, firstName"]
                         group:@"lastName"];

You can set up the following data source methods:

  - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
  {
      return [self.people numberOfSections];
  }

  - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  {
      return [self.people numberOfObjectsInSection:section];
  }

  - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      Person *person = [self.people objectAtIndexPath:indexPath];
      // Dequeue cell, configure with person, and return
  }

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Add ObjectiveRelation subscripting helpers

Sugar.

E.g., for a relation, "people",

Ungrouped:

  Person *person = people[0];

Grouped:

  Person *person = people[indexPath];

Signed-off-by: Stephen Celis <stephen@stephencelis.com>