PL2,PL2+: Greatly improve upper bound on weight
Split the weight equation into two parts and maximise each separately
as that gives an easily solvable problem, and in common cases the
maximum is at the same value of wdfn for both parts. This approach was
suggested by Aarsh Shah in: https://github.com/xapian/xapian/pull/48
In a simple test, the upper bounds are now just over double the
highest weight actually achieved - previously they were several hundred
times.
(cherry picked from commit
0964391357ec249cf133c288685e7fab63425eee)