Hydrogenation effects on the thermal and magnetic properties of mono- and bilayer graphene