Fix neighbors fetching in user stories

Order the received queryset if it doesn't have ordering.
Do not order UserStory model by "ref". For some reason the query:

queryset.filter(Q(project__gt=1) | Q(order__gt=2) | Q(ref__gt=26))

is giving the wrong result even when the query:

queryset.filter(Q(project__gt=1) | Q(order__gt=2))

is not! Probably there's something I'm missing.