VE-538: add tracking to the Wikia media insert dialog

https://wikia-inc.atlassian.net/browse/VE-538

This changeset includes moving a utility function out of VE unit tests and into the stringhelper module.