New ptrack implementation. Refs #2927

* Use optparse module for command line arguments parsing.

* Wait for the server to complete starting up before detching from
  parent process and exec() the task, to prevent race conditions.

* Dump the state before removing the socket, to prevent client
  failures.

* Double fork() to detach from terminal.

* Configurable logging to syslog or file to ease debugging.

* Keep timestamps in ProgressState