Contact Process on Random Graphs and Trees