First-principles methodology for quantum transport in multiterminal junctions.