The sanitizer would not update the user agent comment as ecpected, onlycurrent user agent sanitizer behavior is to drop invalid characters
put a warning in log.in the comment section and truncate its length if necessary, along with
putting warnings in log.
Note that due to a bug, invalid chars are actually not dropped from the
comment section despite the log states it.
The current behavior is not really user friend, and the bug could lead
to BIP0014 violation.
This diff moves the checks at init time, to allow for the node startup
to fail with an error message if the requirements on the user agent are
not met. This is actually the same behavior as bitcoin core.
Depends on D2290