Not sure I agree with changing the type like this.

With this change, we now always perform an integer to double conversion on wdf, but if `c == 'b'` we won't use the converted value (except to test if it is zero or not).  And similarly, `get_idfn()` doesn't use termfreq if `c == 'n'`.

The overhead of the unnecessary conversion shouldn't be huge, but we call these functions a lot, so it could add up.  There was a change a while ago from passing doclengths around internally as doubles to passing them as integers, which gave a 3% speedup overall:

```
* Internally, pass around non-normalised document lengths as Xapian::termcount
  (unsigned integer) not Xapian::doclength (double).  This gives a 3% speedup
  for 10 term OR queries!
```

What's up with the testcase?  We can't want to merge something if it causes tests to fail, but I'm not seeing a failure myself.