Lateral PbS Photovoltaic Devices for High Performance Infrared and Terahertz Photodetectors