Refactor common OpenZFS sysctl access

Darwin and FreeBSD export zfs kstats through the
same APIs, so moving functions into a common file.
15 files changed