Construction of a Dual-Function Metal–Organic Framework: Detection of Fe3+, Cu2+, Nitroaromatic Explosives, and a High Second-Harmonic Generation Response