reimplementation of close button in files_pdfviewer

closing is done via reloading of the page which is not nice, but the way it was before is not entirely working. It would close the pdf viewer but for the next pdf file the download dialoge appears instead of pdf viewer.

One last point: I hope I've done the changes to the right files. In my opinion the on_event.js is not loaded at all, so I put it in the viewer.js