Restrict values used for prefRank

We want to restrict the values that can be used with prefRank. This
gives us flexibility to add new types of rank constraints going forward
without breaking existing code. For example, we may want to add support
for 'source' and 'sink' rank constraints.

We currently accept 'min', 'max', and anything that starts with 'same_'.
The last behaves like prefRank used to - nodes with the same key will be
constrained to the same rank.