Add optional idleTimeout feature

- Also move sessionID handling out a "layer" to preserve its value
  throughout a real page-load-unload session.