The multicomponent KP and Fay trisecant formula