Add bookmark and user stats apis.

- Update the dashboard to use it via new JS API and Views
- Fix nasty prototype bug that caused issues with multiple api calls on a
page.