Refactor follow prev/next links

- Simplified everything.
- Made it more DRY.
- Patterns can include the * and ! wildcards, just like the black list.
- Patterns must match either at the beginning or at the end of the link
  text.
- Patterns don’t match in the middle of words. Works with non-English
  characters too.