SearchContext: remove dispose_has_run() function

It was true when the SearchContext had a strong reference to the buffer.
The buffer was NULL only if dispose_had_run(). But it is now a weak
reference. So the buffer can be NULL even if dispose() hasn't run.

Doing manually the check for buffer == NULL can be done easily, so a
function is not really needed.