grammar.js: Segregate sort_by and limit from filters
The grammar should not allow using sort_by and limit more than once throughout the query.
Unlike other filters, these two must not be concatenated by 'and' or 'or'
Migrated from D6024 (view on Phabricator)