Fix copy operation

Do not use locks when moving or copying folders to avoid creating empty
files.

Moved is_dir() check to the storage wrapper's rename() and copy() methods.
Now using $this->storage for the is_dir() check.

Removed clearstatcache() which does not seem to be needed any more when
using $this->storage.

Fixes https://github.com/owncloud/apps/issues/1932

I tested this with https://github.com/owncloud/core/pull/11104 where the original symptoms appeared (the recovery key backups used to create zero files as shown here https://github.com/owncloud/core/pull/11104#issuecomment-55744835)

Please review @th3fallen @icewind1991 @schiesbn