Move a utility function to gs-utils

The gs_string_replace function is not really very specific
to the app widget, so move it to utils.