Variational Calculation of Three-Nucleon Electroweak Capture Reactions