Fix off-by-one-link error in image--set-property

* lisp/image.el (image--set-property): Ensure new value is set even
in the unlikely case that the plist is empty.  Fix off-by-one-link
error when deleting a property. (bug#35285)
* test/lisp/image-tests.el: New file.
(image--set-property): New test.
1 job for emacs-26 in 26 minutes and 15 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Test
passed #1406
test

00:26:15