Change output functions to return strings of graph only

Now the current trunk state is stored in a global variable magit-pg-trunks