Fixed EZP-21444: SQL query error in fetch('content',  'keyword') with some 'sort_by' parameters

Extends @pedroresende's PR: #726.

Issue: https://jira.ez.no/browse/EZP-21444

Pedro's patch is correct, there is no reason to join `$contentAttributeTableAlias.version` with `ezcontentobject_name.content_version` while `ezcontentobject.current_version` is always around.

The possible problem mentioned by @andrerom on @pedroresende's PR with *sort_by* set to "name" does not exist. In that case, the `ezcontentobject.name` field is used.

This fix also improves the query a lot by not joining with `ezcontentobject_name` at all with a *sort_by* based on attribute (as this is the case in default's ezdemo blog template). This join can potentially be very big, depending on the number of languages available.

Tests done:
Using the `fetch('content',  'keyword')` with all possible *sort_by* parameters.