Adding sorting to search results.

I'm not keen on the fact that we have to enumerate all of the possible names in both places (v4 and charmstore).

Perhaps a nice approach might be to add a function to do the translation:

    func ParseSortField(field string) (SortParam, error)

Then we can avoid enumerating the fields specifically inside the API endpoint.
And the SortParam members could be unexported too (it could just hold an elasticsearch.Sort member).