Move flag parsing to main package
This exposes setup and admin functions in the writefreely package, and
uses them in the main application, initialized by the flag parsing that
now happens there.
This is the first step towards making writefreely usable as a
standalone package.