[PATCH 5.15 068/146] thread_info: Add helpers to snapshot thread flags