Split off implementations of iv_thread_get_id() into separate files.

And rename them to iv_get_thread_id() in the process, as these should
not be primitives provided by the iv_thread module.  (We'll provide
backward compatibility wrappers, of course.)

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
poll_mt: Version 3.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>