(bug #55512) QuantityValue rewrite based on DecimalValue

NOTE: merge Ie7f15f3585fda into WikibaseDataModel first, to avoid
breaking tests.

Change-Id: I1d1cb7367d7de38530ab2890bb87d178efda2cf8