Add asserts to verify stability of struct proc and struct thread layouts.
Some notes:
- Only i386 and amd64 layouts are checked, other Tier-1 (or close to it) architectures would benefit from the same check.
- Unconditional enabling of the asserts depend on the stability of locks memory layout. If locks are optimized to avoid bloat when some debugging or profiling features turned off, it makes sense to only assert layout for production configs.
Reviewed by: badger, emaste, jhb, vangyzen
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D10526