_sync_config_from_ui() now uses hasattr() for _port_var, _erase_cb_var,
_xilinx_path_var, and _ip_string_var so it doesn't crash when called
during _build_config_panel() before those widgets are created.
This fixes the AttributeError: '_tkinter.tkapp' object has no attribute
'_port_var' that occurred on startup.