Australian media giants Nine and Fairfax agree to merge