Refactored openxcap script and runtime logic
- Adapt to process changes in python-application 2.8.0
- Use argparse to handle command line arguments
- Replaced --pid with --config-dir and --runtime-dir
- Added --systemd option for running as a systemd service
- Added --debug option to enable verbose logging
- Added --debug-memory option to eanble memory debugging
- Added code to wait for network to become available on startup