adds persistence of sort settings for events, photos within events, and library photos. #1104 and #1103.