Added "close" event triggering and returnValue

- added "close" event triggering for any attached listeners on the
<dialog> element
- set returnValue on the element if provided as argument for the close()
method

as per spec
http://www.whatwg.org/specs/web-apps/current-work/multipage/commands.html#the-dialog-element
Fix for previous
Fix for "Missing space after the if"
Fix for "space after each comma"
Merge pull request #2 from suhajdab/master

Added "close" event triggering and returnValue