started working on more general page navigation history mechanism

Started by creating a PageId enumeration as an abstract identifier
for a page, and a PageStack object to keep track of which
pages the user has visited.