Add PID file support
Add PID file support

This adds support for writing a PID file upon startup and if it already
exists we exit with the assumption of another NIPAPd already running.
This is a fairly safe assumption as we not only check for the files
existance but that it is locked. If nipapd dies or is killed, the lock
will be removed and so no stale pid files can hang around (the file will
actually exist, but won't have the lock..).

The default is not to write a pid file, but one can be specified in the
configuration file or using command line arguments.

Fixes #113

bbaja42/NIPAP,bbaja42/NIPAP,garberg/NIPAP,ettrig/NIPAP,garberg/NIPAP,SpriteLink/NIPAP,SpriteLink/NIPAP,fredsod/NIPAP,fredsod/NIPAP,bbaja42/NIPAP,plajjan/NIPAP,bbaja42/NIPAP,SpriteLink/NIPAP,SoundGoof/NIPAP,bbaja42/NIPAP,plajjan/NIPAP,ettrig/NIPAP,ettrig/NIPAP,SoundGoof/NIPAP,SoundGoof/NIPAP,fredsod/NIPAP,garberg/NIPAP,garberg/NIPAP,SoundGoof/NIPAP,plajjan/NIPAP,SpriteLink/NIPAP,bbaja42/NIPAP,ettrig/NIPAP,garberg/NIPAP,fredsod/NIPAP,fredsod/NIPAP,garberg/NIPAP,plajjan/NIPAP,plajjan/NIPAP,SpriteLink/NIPAP,ettrig/NIPAP,SoundGoof/NIPAP,SoundGoof/NIPAP,ettrig/NIPAP,plajjan/NIPAP,SpriteLink/NIPAP,fredsod/NIPAP