Subwavelength optical localization with toroidal excitations in plasmonic and Mie metamaterials