MBS-7578: Sort options with same child_order by name

While child_order defines the order of options in an option tree,
multiple options with the same child_order value should be sorted by
name, according to the current locale. (Previously, they were ordered
by their database row ID.)
MBS-7605, MBS-7669: trim strings in /ws/js/edit, mini relationship editor
Also trim/collapse whitespace for comments, join phrases
Merge remote-tracking branch 'chirlu/mbs-7578' into beta

* chirlu/mbs-7578:
  MBS-7578: Sort options with same child_order by name
Merge remote-tracking branch 'bitmap/ws-js-trim-strings' into beta

* bitmap/ws-js-trim-strings:
  Also trim/collapse whitespace for comments, join phrases
  MBS-7605, MBS-7669: trim strings in /ws/js/edit, mini relationship editor