Sorting support in beets query mecanism (dbcore)

Add sorting support  (see #749)

 * in the dbcore API and as a new syntax for queries
 * default sort order can be defined in the configuration file
 * documentation and tests case are update accordingly

Plugin-defined Sort objects are not yet implemented but this could be done later (and everything is in place for that).
FWIW, the idiom I see (and use) most often is:

    sort = sort or sort_order

which, while "clever", is readable to me because it is idiomatic.

One more style nitpick: parentheses are not required on the previous line.