Phase-resolved terahertz self-detection near-field microscopy