[core] Make get_properties return the real current value of properties
[core] Add a method set_property to object

This allow to modify at runtime the value of some properties, for
example to reflect changes in the capacity of the sensor.
On the basis of a private patch of Osama Salah.