util: introduce a common interface for setting thread names