Made uwsgi pids retrieval compatible with psutil>2.0.0

Also added some logging and cleaned code

Change-Id: Icd5f239d346d2e7120ce000dc500cde09228a6b5