Added methods to define default sort

My first ever pull request!

OK, so with this pull, we can define default sorts and field limiters with defaultSortInfo() and defaultFieldInfo().  If the client passes a query string in the URL, they are completely overridden.

One thing I tried to do was to add the processing methods to check for invalid stuff, and allow you to supply the defaults in the same way as you specify them in the URL; e.g. instead of DESC/ASC you can simply supply 'fieldname' or '-fieldname'.

Field filters (as opposed to field limiters) seem to be more complicated, so I've leaving them for now.

So... how does it look?


The failures were caused by the random title on the test nodes.  Since we are sorting by label, this was causing the nodes to be sorted in a different order than they were originally created in.

Consider:
    $node = reset($nodes);
    $cid = 'v1.1' . '::uu' . $account->uid . '::pa' . 'et:node::ei:' . $node->nid;
    $record = $cache->get($cid);
    $this->assertEqual($pre_cache_results[0], $record->data, 'Data in cache bins is correct.');

$pre_cache_results is being built from $handler->get(), which is now being sorted by label, whereas $record->data is being built from the nid of the first element of $nodes, which is ordered by id, so the test will fail 66% of the time, depending on what the random titles generate.

By applying the sort function to $nodes, reset($nodes) and the $pre_cache_results[0] now point to the same node, so the test is now valid.