re-select the chosen option, after re-populating the select with new opt...

...ions

A real headdesk mistake. There's this JavaScript that keeps the field lists synced with the checkboxes of fields that are visible. It wasn't retaining the selected option when it re-populated those select boxes.

This solves the problem and also does the extra bit to force the selected attribute to be present so it doesn't break preview functionality.

To test: 
* add filters. Edit the sorting. Save it. Then edit it again and see that now the fields are still selected.
* check and uncheck boxes on the "choose your content" panel, and see that your selected options are still OK.
* make sure preview still works too

[delivers #52484965]