[Chromoting] SessionLogger refactor.

Motivation:

When a remoting connection fails, we often need to collect extra
debugging information in additional to the error tag.  For example,
when the host goes offline, we would like to report the corresponding
XMPP error stanza as well.

In the current design, we pass the XMPP error stanza to the SessionLogger
as a separate argument in logSessionStateChange().

In this pattern, we need to add a new argument to logSessionStateChange()
for each error specific detail.  As we collect more and more extra info
(e.g. PNaCl error, script error callstack), this pattern quickly becomes
unmanageable.

Summary of changes:

1. When the connection fails, the caller set the |detail| field in the
   remoting.Error object. When logSessionStateChange() is called,
   SessionLogger calls error.fillLogEntry() to translate the
   |detail| field into the corresponding fields in the log entry.
2. Consolidates logClientSessionStateChange() and logSessionStateChange()
3. Remove the dependency of remoting.ClientSession.State from
   SessionLogger.js
4. Report bad version as a connection failure instead of user
   cancellation

BUG=552693

Review URL: https://codereview.chromium.org/1410563006

Cr-Commit-Position: refs/heads/master@{#358726}
13 files changed