Fix history anchoring where no footer metadata exists

Anchoring to footer metadata from the document header metadata is broken for some formats, see:

https://www.agileplannerapp.com/boards/105200/cards/6168

for details.

 - Be specific about views which contain footer metadata and anchor to them only.
 - Fix navigation scrolling into expanded footer metadata.