Add hooks to support an A/B test of the scratchpad

See corresponding commit in webapp for details

Test Plan: See corresponding commit in webapp

Auditors: joel