bhyve: Fix some warnings in the snapshot code
- Qualify unexported symbols with "static".
- Drop some unnecessary and incorrect casts.
- Avoid arithmetic on void pointers.
- Avoid signed/unsigned comparisons in loops which use nitems() as a bound.
No functional change intended.
MFC after: 1 week
(cherry picked from commit c9faf6987406781debb06ec5e40aa1de6d11ac4f)