model: move get_thread() implementations out of header