Perturbation analysis for best approximation and the polar factor by subunitary matrices