Switched from optparse to argparse

Now use subcommands including the core 'deploy' subcommand.
Refactored testing code to accomodate argparse.

Argparse usage improved modularization of parsing, but also broke some
unit tests. Additional breakage resulted from use of 'deploy' subcommand.