Start implementing visit-tracking.

Add an app-global object for tracking page visits (a.k.a. web-history).
Add an action to report the web history’s statistics through an alert.
Add another action to clear the web history of items (with a
confirmation alert).

Add a user preference to enable the web-history statistics reporting
action.

Add sanity-checking during the application delegate’s initialization.
Redo formatting of default preference list.

Put each preference on a separate line to minimize source control
management change logs.
Add storage of tracked visits between sessions.

Add two actions between the global web-history instance and its storage
file, one to load to the object and one to save to the file. Add user
preference to load the web-history store on launch and save it on
termination. Add a private preference storing a file bookmark to the
web-history store. Since bookmarks work only on existing files, use
various properties for generating the default URL for the store.
Rearrange some methods.

Group all the method overrides together.
Add custom menu for the app's Dock tile.

Add a Dock menu, going between the automatically defined items, with a
single action to open a new browser window.
Remove web-history merge code as unfeasible.

Merging is worthwhile if common items keep the latest timestamp. If
adding a common web-history item updates its timestamp to Right Now,
the results are corrupted. More research is required before trying
again.
Add actions to revisit previous pages.

Add dynamically generated menu items to the menu for each visited day
in the global web-history instance’s database, each menu item having a
submenu for the individual visited pages. Add an action for the menu
items representing pages to have the corresponding page loaded in the
frontmost browser window (creating a window first, if needed).

Add a class facilitating updates to the tracked-visit menu items
whenever the global web-history instance changes. Add an instance of
this class to the application delegate and add a method to update the
menu to the delegate.
Enable updates on history menu item titles.

Watch when any web-history item changes. If the item corresponds to a
menu item in the History menu fragment, update the menu item’s title.
Refine handling of removed history menu items.

Instead of rebuilding the entire history menu when some web-history
items are removed from the global web-history instance, remove the
specific menu items. Remove history submenus whenever item-removal
leaves a submenu empty.
Refine handling of added history menu items.

Instead of rebuilding the entire history menu when some web-history
items are added (or re-added) to the global web-history instance, add
(or shuffle up) the specific menu items. Remove history submenus
whenever item-transfer leaves a submenu empty. Add history submenus
whenever an item needs to be (re)assigned to a new day.

Refactor some of the menu-building code to new functions. Rename some
variables. Add break statements to switch-cases before surrounding them
by braces.