core: Use OutputState in JSON instead of map
core: Use OutputState in JSON instead of map

This commit forward ports the changes made for 0.6.17, in order to store
the type and sensitive flag against outputs.

It also refactors the logic of the import for V0 to V1 state, and
fixes up the call sites of the new format for outputs in V2 state.

Finally we fix up tests which did not previously set a state version
where one is required.

terraform-providers/terraform-provider-template,btobolaski/terraform-provider-linode,terraform-providers/terraform-provider-template,hashicorp/terraform-provider-template,btobolaski/terraform-provider-linode,btobolaski/terraform-provider-linode,hashicorp/terraform-provider-template,hashicorp/terraform-provider-template,terraform-providers/terraform-provider-template