WCompleteLineEdit: a new algorithm, fix Issue #123

Switch the algorithm of needComplete() to a new one.
It's correct and simpler than the old one.

It should fix Issue #123.