Code refactoring for updating the lightable internal cache.

This is needed to be able to live update the lighttable when changing
stars and the sorting is on stars.
When changing stars to a picture, make sure we update lighttable view.

This ensure proper order when the sorting is on stars.