Remove GetUserMappingId() and GetUserMappingById().
These functions were added in commits fbe5a3fb and a104a017,
but commit 45639a05 removed their only callers. Put the related
code in foreign.c back to the way it was in 9.5, to avoid pointless
cross-version diffs.
Etsuro Fujita
Patch: <d674a3f1-6b63-519c-ef3f-f3188ed6a178@lab.ntt.co.jp>