pre-upload: Check for invalid USE-setting in make.*.

Check that $USE isn't overwritten or referenced before it's
been defined in Portage make.conf and make.defaults files.

Also update pre-upload*.py to pass existing checks.

TEST=added unit tests; also manually tested with broken and
     non-broken make.conf and make.defaults files

Change-Id: I77a6b52ba966c72ae6933f30616c0396dd856912
Commit-Queue: Dan Erat <>
Trybot-Ready: Dan Erat <>
Tested-by: Dan Erat <>
Reviewed-by: Mike Frysinger <>
3 files changed