Follow-up to T326081 and T326474.
Trim spaces from the output of getElementSortKey(). This way we don't have to take care of it afterwards, and the handlers consistently receive a trimmed value:
- is() handlers: they were already receiving trimmed values. The number parser was just applying a redundant trim.
- format() handlers: they were receiving non-trimmed values. Some handlers (namely text and date) were applying a trim afterwards, the others were not.