High-Performance Nanowire Electronics and Photonics on Glass and Plastic Substrates