Support HAXApplication object creation from pids

Depends on #9 to work (and for the diff to make any sense).