Make global analysis optional

We have noticed the high memory usage in #75, and we would like to revert back to single AST mode by default, and enable global analysis only by users' intents.