Introduce support for specifying sort order.

Describes how a server may optionally support requests for
primary and related documents to be sorted according to
specific criteria.
Merge pull request #148 from dgeb/sorting

Introduce support for specifying sort order.