Clean-up of finding the lowest lock instance

The code had a number of issues: it used slist_append, which is O(n),
making the list construction O(n**2). Finding the lowest lock was also
done in a rather non-elegant way. Also, the list was 'free'd, but not
it's content (one needs 'free_full' for that). It seems that the author
did momentarily forget about the properties of single linked lists ...

Anyways, the whole list construction was needless anyway, because one
could just save the lowest lock instance integer while iterating over
the locks.