Gunicorn check: get master process in a more reliable way

Fix #706

Also fix bad use of class/static methods