source4 samr: cache samr_EnumDomainUsers results

Add a cache of GUID's that matched the last samr_EnunDomainUsers made on a
domain handle.  The cache is cleared if resume_handle is zero, and when the
final results are returned to the caller.

The existing code repeated the database query for each chunk requested.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
23 jobs for gary-samr-enum-groups in 273 minutes and 55 seconds (queued for 1 second)
Status Name Job ID Coverage
  Build
passed build_ctdb #120099227
docker shared

00:43:01

passed build_others #120099229
docker shared

00:14:09

passed build_samba #120153875
private docker

03:20:41

passed build_samba_ad_dc #120099243
docker private

01:07:56

passed build_samba_ad_dc_2 #120099221
docker shared

00:39:28

passed build_samba_ad_dc_2_py3 #120099222
docker shared

00:27:19

passed build_samba_ad_dc_py3 #120099245
docker private

00:15:42

passed build_samba_buildpy3_only #120099230
docker shared

00:23:09

passed build_samba_ctdb #120099228
docker shared

00:19:12

passed build_samba_fileserver #120099241
docker private

00:17:27

passed build_samba_libs #120099224
docker shared

00:33:36

passed build_samba_libs_py3 #120099225
docker shared

00:30:47

passed build_samba_none_env #120099214
docker shared

00:45:00

passed build_samba_nopython #120099215
docker shared

00:29:06

passed build_samba_nt4 #120099237
docker private

00:33:40

passed build_samba_nt4_py3 #120099239
docker private

00:10:32

passed build_samba_o3 #120099219
docker shared

00:33:07

passed build_samba_purepy3-none_env #120099231
docker shared

01:13:05

passed build_samba_py3 #120099234
docker private

00:59:56

passed build_samba_static #120099226
docker shared

00:45:24

passed build_samba_systemkrb5 #120099216
docker shared

00:16:03

passed build_samba_xc #120099218
docker shared

00:06:32

failed build_samba #120099232
docker private

02:03:27