The Good, the Bad and the Cunning: How Networks Make or Break Cooperation