move pxtype{no,str} back to common; change parse_pxspec to parse the proxy type, too; refactor a bit more
refactor; move proxy related functions to the proxy module (duh)