Add M#getSessionId

Use it to generate/fetch a random session ID stored in localStorage.

Change-Id: I501e5a7a4e04797dcc372346262771e8f97aa58b