Use topic title as page title for permalinks.

Not 100% happy with this solution, it seems very special-cased,
but I can't find the right way to abstract this into a general case.

Change-Id: I1a6a9e555710f31fa4aadc24713c63b93ad33e8a
Merge "Use topic title as page title for permalinks." into frontend-rewrite