Make rmdir() more robust against faulty FTP servers

[RT #100694] Some FTP servers simply don't process NLST properly. Use the
RFC standardized MLSD command first, then fallback onto NLST if no data is
provided.

Caveat: MLSD will return 501 if given a file instead of a directory.  We
ignore this error and try NLST anyway.  That command should subsequently
fail and then we return the empty list.