[web] Add some memos to ComposedMessage
Summary:
Now that it's a function component, we should take advantage of React hook best practices and memoize as much as we can.
Depends on D13672
Test Plan: Flow and ESLint React hooks rules
Reviewers: tomek
Reviewed By: tomek
Differential Revision: https://phab.comm.dev/D13673