Make BSD code use hardware atomics

Currently we use implementation from
bsd/sys/cddl/compat/opensolaris/kern/opensolaris_atomic.c
which is using global mutex.

This showes up on wait profile of ZFS writes:

(...)
   \-- 469.96 us (0.00%, #250) arc_do_user_evicts
       \-- 469.96 us (0.00%, #250) dbuf_do_evict
           |-- 355.93 us (0.00%, #154) dbuf_destroy
(...)
           |   \-- 76.60 us (0.00%, #53) zrl_add
           |                             atomic_cas_32
           |                             lockfree_mutex_lock
           |                             sched::thread::wait()
           |
           |-- 66.14 us (0.00%, #56) dbuf_clear
           |                         zrl_add
           |                         atomic_cas_32
           |                         lockfree_mutex_lock
           |                         sched::thread::wait()
           |
           \-- 47.89 us (0.00%, #40) dbuf_rele_and_unlock
                                     atomic_add_64_nv
                                     lockfree_mutex_lock
                                     sched::thread::wait()

This patch switches to amd64 implementation.

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>