Ticket #48299 - pagedresults - when timed out, search results could have been already freed.
Description: When a search results object is freed, there is a window
until the information is set to the pagedresults handle. If the paged-
results handle is released due to a timeout in the window, double free
occurs.
This patch sets NULL just before the search results object is freed
in the backend as well as in dse.
Plus, fixed a minor memory leak in pagedresults_parse_control_value.
https://fedorahosted.org/389/ticket/48299
Reviewed and a bug found by tbordaz@redhat.com (Thank you, Thierry!!)
(cherry picked from commit f90c3a6e1933b9cc19a51b17a038f26652c4b2bc)
(cherry picked from commit 56151ed75bbd63af80932fe73a512df835b17593)