Physics and applications of semiconductor nanowire lasers