internal/v4: add sanity checks for metadata
	update dependencies to match juju-core's deps.