Set cookie in response and return version in endpoint data.

By setting the cookie in the response, the client is able to tell when
the export(for each type) has finished. Also, by returning the version
as part of the endpoint data. The client will be able to determine
whether they can rely on the cookie being set or if they need to work
without the cookie.

These changes will be critical to upcoming changes in Cilantro related to exporting as Cilantro will rely on the cookies to know when downloads finish and use the version to know whether to expect cookies or not.