Fix sorting in 'previous()' and 'next()'. Fixes #1453

Tot test, add this to entry.twig.

            <p>current id: {{ record.id }}</p>

            <ul>
                {% set temp = record.next() %}
                <li>Next by default: {{ temp.id }}. {{ temp.title
}}</li>
                {% set temp = record.previous() %}
                <li>Previous by default: {{ temp.id }}. {{ temp.title
}}</li>
            </ul>

            <hr>

            <ul>
                {% set temp = record.next('id') %}
                <li>Next by id: {{ temp.id }}. {{ temp.title }}</li>
                {% set temp = record.previous('id') %}
                <li>Previous by id: {{ temp.id }}. {{ temp.title }}</li>
                {% set temp = record.next('-id') %}
                <li>Next by -id: {{ temp.id }}. {{ temp.title }}</li>
                {% set temp = record.previous('-id') %}
                <li>Previous by -id: {{ temp.id }}. {{ temp.title
}}</li>
            </ul>

            <hr>

            <ul>
                {% set temp = record.next('title') %}
                <li>Next by title: {{ temp.id }}. {{ temp.title }}</li>
                {% set temp = record.previous('title') %}
                <li>Previous by title: {{ temp.id }}. {{ temp.title
}}</li>
                {% set temp = record.next('-title') %}
                <li>Next by -title: {{ temp.id }}. {{ temp.title }}</li>
                {% set temp = record.previous('-title') %}
                <li>Previous by -title: {{ temp.id }}. {{ temp.title
}}</li>
            </ul>

            <hr>