Add defensive code to avoid crash.

Probably not the best fix as it is not on the root cause.
(cherry picked from commit 28be3c41b7b649209b79ac1ea3f1b846836e49d8)
Draw decorations only if zoom is less than 15 images in a row

We only need to know if the image is grouped or is selected when
the image is hovered
Query the db when it is really needed
(cherry picked from commit dbf3f45bf066825622d2fff2a016cba506b259e9)
Use px instead of zoom to decide about decorations
(cherry picked from commit 16faf2ca3b6cd19d02aad31fee83e2741c2d7f3a)
Fix: when show ratings for all images on only show effects for the hovered image

If the option to show stars for all images in lighttable, only hovered image
should show the effects when the mouse id over on star or rejected cross
(cherry picked from commit b11c1105ffca3d7fe283a5125449408c95e79ca1)
rawspeed: remove unused variable