tmf: add utility to validate a name against OS restrictions.

It also creates a valid name by replacing invalid charactors and
prefixing invalid names with '_'.

Change-Id: I5e818d7a6d5a7f939a19dcb986a21320ce82eb8b
Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/37751
Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>
Tested-by: Patrick Tasse <patrick.tasse@gmail.com>
Tested-by: Hudson CI
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>