core: Use values from plan only if object marked as planned
core: Use values from plan only if object marked as planned

This inverts the previous logic so that it's the status of an object in
the state that decides whether we'll use its value from the plan. This
fixes the problem that otherwise after we've actually applied the change
the partial planned object will continue to shadow the final object in
state.

hashicorp/terraform-plugin-sdk,hashicorp/terraform-plugin-sdk