Refs #4478 - prebuild localized apipie cache

Requires https://github.com/theforeman/foreman/pull/1428 to get merged.
Documentation for resources is built during build time. Docs for Index is build in posttrans phase as we need foreman plugins to be present.
We shouldn't use sudo here, su would be better if a user change is necessary, but probably best simply to copy as root.  I don't think we need to or should maintain any foreman ownership.