Refactor: remoted: Strip trailing comment in load_env_vars()
We don't want to do this until after parsing the value, because a '#'
character inside a quoted value should be treated as part of the value.
Note that currently if an unquoted value ends in '#' characters, they
are treated as part of the value. I consider this a bug. For example,
name=value### # comment
would set the "name" environment variable to "value###". For an unquoted
value, I would expect "name" to be set to "value".
For a quoted value, such as
name="value###" # comment
I would indeed expect "name" to be set to "value###".
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>