Set TDP_KTHREAD before calling cpu_fork() and cpu_copy_thread().
This permits these routines to use special logic for initializing MD
kthread state.
For the kproc case, this required moving the logic to set these flags
from kproc_create() into do_fork().
Sponsored by: Netflix
(cherry picked from commit 640d54045bdbf894ae3c75cd9818c29fc2f6e5e7)