title: HashTable coprime issue
body: <p>I am writing a conventional hashmap.
  It always resizes itself to a prime number when needed, and the default hashing func for strings and primitive arrays is a polynomial hash whose coefficient is also a prime, such that it is reserved for hashing so it is always coprime with the modulo prime.</p>
  
  <p>Now I also want to let the user specify a hashfunc.
  I believe the user is also likely to use one or more primes in coefficient, but does not know whether the hashtable might resize to any of them.</p>
  
  <p>What is the workaround? Should the user also be able to specify primes that should be reserved for his/her hashfunc? Should the hashfunc be passed the size of the hashtable and be made responsible for not using it?</p>
  
  <p>I also heard about resizing to powers of 2. Imagine though that only such keys are inserted into the hashmap whose hashes are numbers in which only those bits are turned on whose local value is larger than or equal to the given power of 2. That would all go into the first bucket. That of course makes it easier to come up with a prime not used by the hashmap, but writing hashfunc for this setting is actually harder.</p>
  
  <p>Any elegant solution?</p>