Move all argparsing into main()

So argparse isn't invoked when importing
Fix outdated cmdline parameter
Add reference to docs
Add lots of documentation for replay_event.py
Add sphinx documentation