Nonlinear Optical Techniques for Terahertz Pulse Generation and Detection—Optical Rectification and Electrooptic Sampling