Remove duplicated code from bokeh/session* (#416)
Merge pull request #417 from mattpap/issue-416

Remove duplicated code from bokeh/session* (#416)