PC-BSD/trueos 28de053sys/kern kern_thread.c, sys/x86/x86 mp_x86.c

Free bootstacks after AP startup.

Bootstacks are unused after APs executed sched_throw() in
init_secondary_tail() and started executing on proper idle thread
stack.  Add sysinit that detects that the idle thread for each CPU was
scheduled at least once, and free corresponding bootstack.

Slight addition of the code (~200 bytes) is compensated by the saving,
because even on typical small modern desktop CPU we leak 128K of
memory otherwise (4 pages x 8 threads).

Reviewed by:    jhb
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D18486
DeltaFile
+17-3sys/x86/x86/mp_x86.c
+1-1sys/kern/kern_thread.c
+18-42 files

UnifiedSplitRaw