sys/cddl: Freebsd uses CTLFLAG_RDTUN here

DragonflyBSD does not provide 'early only' read-only tunable.
Hence use suboptimal CTLFLAG_RW flag.

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
sys/cddl/compat: Lockup {rwlock,mutex}.h with mutex(9)

Convert FreeBSD SX(9) locks to DragonflyBSD MUTEX(9) locking.
With one caveat that an equivalent of:

 struct thread * sx_xholder(struct sx *sx);

in SX(9) is a pointer to struct member 'mtx_owner' in the
main struct mtx of MUTEX(9), and so we return that value.

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
arc.c: use curthread,pagethread over curproc,pageproc

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
sys/cddl/*/zfs/arc.c: Port to DragonflyBSD

DragonflyBSD has a different in-kernel threading model,
somethings are named a little differently:

FreeBSD -> DragonflyBSD

 vm_cnt.v_free_count  -> vmstats.v_free_count
 vm_cnt.v_cache_count -> vmstats.v_cache_count
 vm_cnt.v_page_size   -> vmstats.v_page_size

Also,

  td_ru.ru_inblock -> lwp_ru.ru_inblock

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
sys/proc.h: hack in PRIBIO val to continue..

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
sys/cddl: Port vm_cnt.xxx to vm_stats.xxx

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>