Move Policy test helpers into their own file

Since types.go should always be equal to latest API types.go, this
makes future cut and paste refactors easier.

Extracted from #1600