Allows the table to export the list of sources as JSON objects
Add helpers to generate JSON replies

While here, add the Access-Control-Allow-Origin header to enable X requests
Refactor the request handler + send list of sources when queried with ?state