Throw error when hashtable is full.

Previously, linear probing could cause the hashtable to go into an infinite loop
when it got full. Instead, we now throw an error.
Fix an infinite loop in dedup.

We weren’t estimating the number of arc endpoints correctly because we were
ignoring cut arcs. Now we do a better job.