Terahertz photodetectors based on tapered semiconductor nanowires