random: Fix synchronization of hc_source_mask
This variable provides a mask of all registered entropy sources and is
updated when drivers attach and detach (or by sysctl). However, nothing
was synchronizing accesses to it. Use the harvest lock to provide
mutual exclusion for updates, and use atomic_load_int() to mark unlocked
reads.
Reviewed by: cem
MFC after: 2 weeks
Sponsored by: Stormshield
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D52230
(cherry picked from commit c942d9e83ef1122a670bb39736d55fe8f90af83e)