sftp: Fail properly if set_attribute type is wrong

If given an invalid type when setting unix::mode in try_set_attribute,
don't try and change the mode after failing the job.

https://bugzilla.gnome.org/show_bug.cgi?id=730844
smb: Fail properly if set_attribute type is wrong

If given an invalid type when setting time::modified in
do_set_attribute, don't try and change the mtime after failing the job.

https://bugzilla.gnome.org/show_bug.cgi?id=730844