Add XO output to GlobalVariableAnalysis.

There is weird buffering behaviour when using both libxo and llvm output streams, hence we create a custom write callback function that uses llvm's output stream in libxo