[PATCH v1 05/12] bhyve: monitor: refactor register/unregister