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)
15 jobs for gary-bug-12478-v4-9 in 296 minutes and 56 seconds (queued for 1 second)
Status Name Job ID Coverage
  Build
passed build_ctdb #219581160
docker shared

00:28:22

passed build_others #219581162
docker shared

00:17:40

passed build_samba #219581163
docker private

04:56:54

passed build_samba_ad_dc #219581169
docker private

01:26:58

passed build_samba_ad_dc_2 #219581157
docker shared

00:30:05

passed build_samba_ctdb #219581161
docker shared

00:51:24

passed build_samba_fileserver #219581166
docker private

00:37:02

passed build_samba_libs #219581158
docker shared

00:32:36

passed build_samba_none_env #219581152
docker shared

00:56:44

passed build_samba_nopython #219581153
docker shared

00:18:38

passed build_samba_nt4 #219581164
docker private

00:45:35

passed build_samba_o3 #219581156
docker shared

00:19:53

passed build_samba_static #219581159
docker shared

00:22:25

passed build_samba_systemkrb5 #219581154
docker shared

00:11:48

passed build_samba_xc #219581155
docker shared

00:04:50