Use pointers not flags [DNM]

Port index generation script to use programme pointers to determine live revisions rather than flags. Use same method on revisions page for these states.

Requires testing as although code change was minimal, any issues with this feature are likely to have a significant impact.

May fix repercussions of faulty flag issue, leading to programmes being invisible in search / showing as unpublished.