3e5ca0bc13
Cherry-picked from PR #2470 by @NaesayerX. write_runtime_status used None as 'don't change', making it impossible to clear stale error_code/error_message after platform recovery. Now uses a sentinel (_UNSET) so None means 'clear this field'. Passing error_code=None removes the key from the platform payload instead of leaving haunted error metadata in gateway_state.json.