cpufreq_dt: Find the closest frequency
When building the frequencies table we convert the value in the DTS to
megahertz and loose precision. While it's not a problem for most of the
DTS it is when the expected frequency value is strict down to the hertz.
So it's either we don't truncate the value and have some ugly and long
values in the sysctls or we just find the closest frequency.
Do the latter.
Reviewed by: mmel
Differential Revision: https://reviews.freebsd.org/D41762
Sponsored by: Beckhoff Automation GmbH & Co. KG
(cherry picked from commit 17c17872ca98df0e2b9f9c7a2c41ef73f7dee21a)