WIP: instant-share long polling and cookie setting

https://trello.com/c/al5ER6ei work.  Not yet ready for review.