Allows the user to configure the default sort of the default query.
removed duplicated code
added ability to change default sort field
Merge commit 'ceb52823dab09a9e07ea9d514f749de4f0155280' into 7.x

Conflicts:
	includes/query_processor.inc
Fixed merge errors
Merge pull request #116 from rosiel/7.x

7.x