Electric charges and forces in atomic force microscopy and nano-xerography