search_matched(): was not counting the amount of skipped results in a search.

Since the enclosing loop had an exit condition set to "!skip_records", the
variable "skip_records" was always false in the loop. Moreover, the test was
not done in the right block.
vmf_to_string(): be thread-safe.
xmalloc_chunk_is_valid(): off-by-one check caused chunks to appear invalid.

This in turn could cause thread-private chunks to be wrongly returned to the
xmalloc() free-list, leading to memory corruptions!