Electrical Percolation in Metal Nanowire Networks for Bulk Polymer Nanocomposites and Transparent Conductors, and Resistive Switching in Metal/Polymer Nano-Gap Devices