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.
@domcleal,I believe I've added the ownership because the foreman-rake that runs later runs under the foreman user and couldn't write into the directories. Would be `chown -R foreman.foreman %{_datadir}/%{name}/public/apipie-cache/` better way to solve this?