Cubic time algorithms of amalgamating gene trees and building evolutionary scenarios