Move TruncateUTF8 to util (components/autofill)

When building using jumbo, files gets merged and
functions with the same name may end up in the
same namespace and conflict. This happens for
the function TruncateUTF8.

This commit solves the issue by moving the function
to a shared util file.

Bug: 869381
Change-Id: Ia9f754138fb18aa9af575f7cd2f92bca4e8ea0c2
Reviewed-on: https://chromium-review.googlesource.com/1168497
Reviewed-by: Vadym Doroshenko <dvadym@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#581866}
4 files changed