focus_mode: Move utility functions to a separate file and add tests

This moves utility functions to a separate file and adds a test. It also
makes sure that all ash code access API classes through const functions.

Bug: b/342659922
Test: YouTubeMusicUtilTest.FindBestImage
Change-Id: I0d863a6acdadb7a76dcece5280dc49ebf3bef2fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5634751
Commit-Queue: Yongshun Liu <yongshun@chromium.org>
Reviewed-by: Alex Ilin <alexilin@chromium.org>
Reviewed-by: Richard Chui <richui@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1316541}
NOKEYCHECK=True
GitOrigin-RevId: 9b3467d7fde2eb9c7c4ab5d7854027c74efa3403
1 file changed