[FEAT] UploadWarning uses the warning code

To allow scripts easier to determine what the warning is about the
UploadWarning contains an attribute 'code' which is the warning
code recieved from the API.

The UploadWarning is now a subclass of APIError. This may break
scripts which already parse the warning message but use
'str(exception)' instead of 'exception.message'.

The upload.py script uses this feature to allow abortion only because
of specific warnings.

Bug: 69852
Change-Id: I78e572ce5e40e7cfcdfdf67138c8aa2e41bfebdb
Merge "[FEAT] UploadWarning uses the warning code"