Refactor UISourceCode.addMessage
Refactor UISourceCode.addMessage

This is in preparation to update layout tests for
https://crrev.com/c/2784640

Bug: chromium:1189086
Change-Id: I77570f6fa05385f09a29d639797e9a244e64278b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2784727
Reviewed-by: Wolfgang Beyer <573aa99bb19da47d816981118f95c945310dd3f4@chromium.org>
Commit-Queue: Sigurd Schneider <f04d242e109628a27a0f75fd49a87722bcf291fd@chromium.org>

ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend