Ensure each greenthread uses it's own Session instance

This uses a thread local store, allowing each greenthread to
have it's own session stored correctly. Without this, each
greenthread may end up using a single global session, which
leads to bad things happening.

Change-Id: I1ceb33d2bcb531d444ad05cf6cf74b6edd4e7d39
Closes-Bug: 1343211
Merge "Ensure each greenthread uses it's own Session instance"