Refactor to pull origin from conf file

For remote notebooks we'll be receiving a different origin header, and must be aware of that. Should be backwards compatible, and is a companion PR to https://github.com/bgruening/galaxy-ipython/pull/21