The boards of two real estate investment trusts have agreed the terms of a proposed merger, which would create one of the UK's biggest Reits.