Support modification of unseen and watched.

 * Fix JSON in RESTful API docs.
 * Various cleanup in server-side API.