Moving some prims from package `prim.etc` to `prim`

This fixes dependency problems with my previous commits, due to use of
`prim.etc` classes by the optimizer.