Torsional oscillation monitoring by means of a magnetoelastic resonator: modeling and experimental functionalization to measure viscosity of liquids