Use --with-piddir instead of --with-localstatedir and add disconnect and reconnect to audio output code and options and clean up some unused code