Lattice polarization effects in electrochromic switching in WO3−x films studied by pulse-nanogravimetric technique