The future could see more megamergers, middle-market deals and initial public offerings.