Don't trigger change event unnecessarily

When initialising the selects, do go through and narrow down the child
options based on currently selected parents, but do so using a function
rather than triggering change on the parents.

Also don’t trigger a change event on the child during normal use if the
parent changes but the selected child option exists in the new set of
options. Instead just re-select it and leave it at that.

Also cleaned up some stuff and used clearer variable names in places.