Fixed socket res.get to work when `res.headers` isn't present.
Changed getOrigin() function to check for `socket.handshake.headers.origin`, which is only present on cross-origin requests.
Merge branch 'master' of https://github.com/balderdashy/sails