Magnetization study of nanograined pure and Mn-doped ZnO films: Formation of a ferromagnetic grain-boundary foam