Fully binary search for named references.

- Still wasn't fast enough.
- Split named references into two tables: those with a terminating semicolon
  and those without. A successful match with a terminating semicolon is the end
  of it. But without a terminating semicolon the longest prefix needs to be
  found.