During the state upgrade process we may have attributes which are no
longer part of the schema type. Because cty requires the data to
strictly match the schema we can't ignore these extra attributes and
must actively filter them. In order to do that we use encoding/json to
decode the state in a generic manner, but we need to account for large
cty.Number values which may exceed float64 precision.