[kernel][riscv64] Use heap allocation for secondary CPU startup Thread

This replaces a global array of Thread objects for each potential
secondary CPU with normal heap (`new`) allocation on demand.  The
heap object lives while the new CPU's thread lives, but doesn't
take up space before that (or after if it ever exits).  This the
kernel overall gets closer to all Thread objects being managed as
normal C++ heap objects.

Change-Id: I4c09a99f4f73e136be64584a1c698149b2a32a5e
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1357975
Fuchsia-Auto-Submit: Roland McGrath <mcgrathr@google.com>
Reviewed-by: Travis Geiselbrecht <travisg@google.com>
Reviewed-by: Nick Maniscalco <maniscalco@google.com>
Commit-Queue: Roland McGrath <mcgrathr@google.com>
1 file changed