initial pass at writing support for running as root and dropping privs.

This is very work in progress, and may do entirely the wrong things right now,
use at own risk.

Side effect of this work:
- Inability to write socket cache is no longer fatal.
move the getopt string nearer to the longopts to keep in sync easier.