In situ electron microscopy four-point electromechanical characterization of freestanding metallic and semiconducting nanowires.