Terahertz time-domain spectroscopy and micro-cavity components for probing samples: a review