Add common string utilities to libbase.

These are useful outside of ART. Nothing changed (aside from fixing
Trim to not segfault on empty strings), so ART should be able to move
to using these.

Change-Id: Id026ebffe8d31f784a91834786ab189680b13a0f
4 files changed