Resonant-cavity-enhanced subwavelength metal–semiconductor–metal photodetector