API pyflakes

- APIWarning, subclass of UserWarning, was never utilised.
- use of warnings module removed in 2008, two months after being
  introduced. r6171
- import of urllib module not needed after April 2014 changeset
  Ib3ff27f5f41f2236eb5510c96751936ac7e98f1e

Change-Id: I78c72a2c564133ed88ac7c87809206edf6dab68d
Merge "API pyflakes"