Webapp share dialog is not closed when client end of the connection is closed

This problem is occurring because the share request dialog must be accepted
before the connection is considered authenticated and the host is only notified
of a disconnect if the connection is authenticated.  The host does receive
an access denied callback in this case as OnSessionAuthenticationFailed is
called.

The initial state (session is not authenticated until dialog is accepted) is
correct so I am adding code to dismiss the confirmation dialog if we receive
OnAccessDenied (via OnSessionAuthenticationFailed) for the JID represented by
the confirmation dialog.  I also reset the host state (from 'connecting' to
'received access code' (i.e. ready for client connection) when this occurs so
the webapp will update its UI appropriately.  This new behavior allows the
remote user to cancel while the share dialog is present and attempt to
reconnect using the same access code.  Since it is possible to display multiple
confirmation dialogs in one session, I removed the static Create method from
the confirmation dialog class and replaced it with a factory class.

On platforms where the confirmation dialog is displayed with a blocking UI
thread (i.e. Windows), the webapp UI will be updated once the timeout
timer fires or the user makes a selection.  On other platforms the dialog
will be dismissed automatically.

BUG=681159

Review-Url: https://codereview.chromium.org/2650443002
Cr-Commit-Position: refs/heads/master@{#458096}
9 files changed