Bug 1415700, part 4 - Use simple string interning for SearchResult strings.
Bug 1415700, part 4 - Use simple string interning for SearchResult strings.

This patch implements a simple string interning class, and uses it to
intern the share the strings stored in SearchResult. Strings are
interned into a hash set that is implemented using a hash table,
because hash set does not have the Entry API, which I use to avoid
repeated lookups. The basic trick is that Rc<> are compared based on
the underlying string data.

I tried a faster hash function, but it didn't make it faster, maybe
because we're actually hashing larger data here.

bill-mccloskey/mozsearch,bill-mccloskey/mozsearch,bill-mccloskey/searchfox,bill-mccloskey/mozsearch,bill-mccloskey/mozsearch,bill-mccloskey/searchfox,bill-mccloskey/mozsearch,bill-mccloskey/searchfox,bill-mccloskey/searchfox,bill-mccloskey/searchfox,bill-mccloskey/mozsearch,bill-mccloskey/searchfox