System Integration and Packaging of a Terahertz Photodetector at $W$ -Band