The Merging History of Massive Black Holes