[SYNCOPE-495] Fix X Close Button behavior, added new selenium test

git-svn-id: https://svn.apache.org/repos/asf/syncope/trunk@1599502 13f79535-47bb-0310-9956-ffa450edef68