Support changing the sort direction of elements

When choosing different sorting criteria for the elements (with the "?C=x"
URL argument), allow also specifying a second "O=x" argument for the
direction: "?C=x&O=A" selects ascending direction, while "?C=x&O=D" chooses
descending direction.