packet-opensafety.c: Fix two bugs:

- Actually register dissector on default UDP ports upon startup.
- expert_...() shouldn't be called under 'if (tree)'

Also: cleanup proto_reg_handoff...() and apply_prefs() code.

Change-Id: I6390d9bf311c9a62fbc43647d9bb19f90156baec
Reviewed-on: https://code.wireshark.org/review/4063
Reviewed-by: Bill Meier <wmeier@newsguy.com>