Fixed directory deletion for SMB and FTP storages

Added deleteFileOrDir() operation
    
Some storages need to use different calls for deleting files or folders, usually unlink() and rmdir().
    
For this, added a new operation deleteFileOrDir() which default implementation will first detect whether the given argument is a file or a directory to decide which operation to use.
    
Some storage implementations don't need to distinguish them, in which case they reimplement deleteFileOrDir() to save the extra is_dir() detection.
    
Fixes #4532 (SMB dir deletion)
Fixes #5941 (FTP dir deletion)

This is based on @icewind1991's suggestion here: https://github.com/owncloud/core/issues/4531#issuecomment-29291826
I tried to not break the existing APIs.
Currently, only the ajax delete.php is using that new call.

If not acceptable, the alternative is to do the is_dir() detection in delete.php for now...

Please review @icewind1991 @karlitschek @DeepDiver1975 @schiesbn