rename common.h -> envoyd.h
switch from setre{gui/uid} -> setres...
handle get_agent's return appropriately