Clean up backwards-compat hacks for ldap
Clean up backwards-compat hacks for ldap

try to make the backwards-compat flows follow the same code paths as the modern
impl.

This commit should be non-functional.

matrix-org/synapse,matrix-org/synapse,matrix-org/synapse,matrix-org/synapse,matrix-org/synapse,matrix-org/synapse