org settings: Extract function to discard changes done in a subsection.
org settings: Extract function to discard changes done in a subsection.

In the new function, property values are handled more carefully i.e.
we first check whether property_name refers to a property values
which we can't get from the value of input elements like we have in org
permissions section for properties like realm_add_emoji_by_admins_only
where we have used dropdown and hence we get a string value but we
expect a true/false (check/uncheck) value.

Also, it is better to trigger a `change` event after changing a value
because we have properties which are dependent on the values of another
settings. Previously we trigger `click` event for checkboxes but
there exist some settings other than checkboxes like dropdown
for realm_create_stream_permission where realm_waiting_period_threshold
only appears after selecting custom values for threshold value from
dropdown.

shubhamdhama/zulip,jackrzhang/zulip,eeshangarg/zulip,jackrzhang/zulip,shubhamdhama/zulip,kou/zulip,rht/zulip,punchagan/zulip,zulip/zulip,andersk/zulip,hackerkid/zulip,synicalsyntax/zulip,showell/zulip,showell/zulip,rishig/zulip,rishig/zulip,shubhamdhama/zulip,kou/zulip,tommyip/zulip,zulip/zulip,timabbott/zulip,zulip/zulip,dhcrzf/zulip,dhcrzf/zulip,punchagan/zulip,rht/zulip,rht/zulip,andersk/zulip,eeshangarg/zulip,andersk/zulip,tommyip/zulip,rht/zulip,hackerkid/zulip,kou/zulip,andersk/zulip,andersk/zulip,punchagan/zulip,rishig/zulip,shubhamdhama/zulip,jackrzhang/zulip,shubhamdhama/zulip,timabbott/zulip,rishig/zulip,kou/zulip,zulip/zulip,jackrzhang/zulip,tommyip/zulip,brainwane/zulip,shubhamdhama/zulip,rht/zulip,zulip/zulip,dhcrzf/zulip,dhcrzf/zulip,brainwane/zulip,timabbott/zulip,rht/zulip,kou/zulip,timabbott/zulip,rht/zulip,timabbott/zulip,punchagan/zulip,synicalsyntax/zulip,jackrzhang/zulip,eeshangarg/zulip,brainwane/zulip,synicalsyntax/zulip,synicalsyntax/zulip,dhcrzf/zulip,punchagan/zulip,hackerkid/zulip,shubhamdhama/zulip,brainwane/zulip,showell/zulip,jackrzhang/zulip,hackerkid/zulip,dhcrzf/zulip,synicalsyntax/zulip,eeshangarg/zulip,hackerkid/zulip,eeshangarg/zulip,andersk/zulip,eeshangarg/zulip,hackerkid/zulip,zulip/zulip,brainwane/zulip,dhcrzf/zulip,brainwane/zulip,timabbott/zulip,kou/zulip,andersk/zulip,showell/zulip,tommyip/zulip,showell/zulip,jackrzhang/zulip,eeshangarg/zulip,showell/zulip,rishig/zulip,synicalsyntax/zulip,punchagan/zulip,rishig/zulip,rishig/zulip,tommyip/zulip,hackerkid/zulip,synicalsyntax/zulip,tommyip/zulip,punchagan/zulip,zulip/zulip,showell/zulip,brainwane/zulip,tommyip/zulip,kou/zulip,timabbott/zulip