Register context menu as needed

Register on install/update and when browser starts. Prevents trying to
register the context menu more than once.