[core] Adds main.cc which parses command line / config file.