Cleaning up main.cpp

Using boost program_options library. Would be nice to check if all is
fine. Unfortunately, process_argument() from ASTmisc.cpp cannot be
removed, because legacy applications apparently use it (according to
comments in code by Vijay/Trevor). It's a really weird way of passing
options in C, though, and we may consider removing it.

Also, main.cpp uses some static variables for cleaner code, less
argument passing between functions. I think this makes the code easier
to read, and main.cpp will only be called 1x, so no threading issues
with using static variables.