exchange Key, Priority in type

This changes the order of key and priority in the priority search queue
type and in the predicate arguments, creating a consistency with the
existing pqueue type, making an in-place replacement possible.

This also changes the argument order for del_min, to allow for state
variable threading notation.

The change only concerns the outward facing psqueue(P, K) type, the
internal view types are not changed.
adapt test program to new type signature