Fixed orgId not populating on visualforce pages

Extracting it from the sessionId works in contexts where there is no
oid cookie (like visualforce pages).
Fixed wrong 4th character in userIds

where possible. My domain and pods not up to date in the podMapping
variable will fail to resolve. Previously the 4th character of "E" was
always used, which led to the wrong userId being displayed on all pods
other than NA9.