On the Spectral Efficiency and Energy Efficiency Analysis of Cache-Enabled Heterogeneous Networks with Device-to-Device Communication and Cooperative Transmission