Support reading input graph from stdin and write output graph to stdout by default.
gcc -O4 is the same as -O3.
Merge pull request #1 from ms705/optimizations

Add support for reading from stdin and writing to stdout (+ associated API changes)