Move the 32-bit compatible procfs types from freebsd32.h to
<sys/procfs.h> and export them to userland.
- Define __HAVE_REG32 on platforms that define a reg32 structure and check for this in <sys/procfs.h> to control when to export prstatus32, etc.
- Add prstatus32_t and prpsinfo32_t typedefs for the 32-bit structures. libbfd looks for these types, and having them fixes 'gcore' in gdb of a 32-bit process on a 64-bit platform.
- Use the structure definitions from <sys/procfs.h> in gcore's elf32 core dump code instead of duplicating the definitions.
Note that this requires exporting reg32 from <machine/reg.h> to
userland, not just in kernel builds when COMPAT_FREEBSD32 is enabled.
Not sure what the best #ifdef checks are for this, or if LP64 is
fine.
Also, it seems that we don't really need prpsinfo32 or thrmisc32.
The gcore bits in userland don't bother using thrmisc32 at all,
and do no conversion for prpsinfo32.
Also, the thrmisc structure doesn't include a version member, so
THRMISC_VERSION is unused and should perhaps be removed?