Properties of NiO sputtered thin films and modeling of their sensing mechanism under formaldehyde atmospheres