Refactor: tools: Strip rest of trailing whitespace in load_env_vars()
By stripping the rest of the trailing whitespace after stripping the
comment, we eliminate the need to null-terminate explictly. If the value
is valid (not followed by any garbage), then end already points to a
terminating null byte after stripping the comment and remaining
whitespace.
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>