sanitizer: handle values ending with spaces

This patch also reworks the autohelp _sanitize_default to wotk on an Opt
object instead of its name and default value.

Change-Id: I2b1b0dd44f64a49b6e41c9922555cd968822d144