Extract display name patterns to constants
Extract display name patterns to constants

This changes to constant patterns for calculating display names, which cuts out
~18% of the time spent and reduces GC pressure as well.

matrix-org/matrix-js-sdk,matrix-org/matrix-js-sdk,matrix-org/matrix-js-sdk,matrix-org/matrix-js-sdk