ldap server: generate correct referral schemes

Ensure that the referrals returned in a search request use the same
scheme as the request, i.e. referrals recieved via ldap are prefixed
with "ldap://" and those over ldaps are prefixed with "ldaps://"

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12478

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri May 24 05:12:14 UTC 2019 on sn-devel-184

(cherry picked from commit 1958cd8a)
22 jobs for gary-bug-12478-v4-10 in 216 minutes and 42 seconds (queued for 3 seconds)
Status Name Job ID Coverage
  Build
passed build_ctdb #219578868
docker shared

00:36:12

passed build_others #219578870
docker shared

00:15:23

passed build_samba #219578872
docker private

03:36:39

passed build_samba_ad_dc #219578875
docker private

01:13:10

passed build_samba_ad_dc_2 #219578861
docker shared

00:23:33

passed build_samba_ad_dc_2_py2 #219578864
docker shared

00:17:16

passed build_samba_ad_dc_backup #219578862
docker shared

00:26:24

passed build_samba_ad_dc_backup_py2 #219578863
docker shared

00:15:57

passed build_samba_ad_dc_py2 #219578876
docker private

00:16:01

passed build_samba_buildpy2_only #219578871
docker shared

00:09:25

passed build_samba_ctdb #219578869
docker shared

00:18:40

passed build_samba_fileserver #219578874
docker private

00:17:52

passed build_samba_libs #219578865
docker shared

00:30:54

passed build_samba_libs_py2 #219578866
docker shared

00:21:19

passed build_samba_none_env #219578855
docker shared

00:46:04

passed build_samba_none_env_py2 #219578856
docker shared

00:23:53

passed build_samba_nopython #219578857
docker shared

00:15:44

passed build_samba_o3 #219578860
docker shared

00:19:44

passed build_samba_py2 #219578873
docker private

01:09:04

passed build_samba_static #219578867
docker shared

00:17:40

passed build_samba_systemkrb5 #219578858
docker shared

00:15:16

passed build_samba_xc #219578859
docker shared

00:07:30