Merge ldb_search() and ldb_search_exp_fmt() into a simgle function.