deposit: refactoring of the modal

* Removes redundant code.

* Registers the Modal as jQuery plugin.

* Reverting the logic of the closure of the import Data without
  touching the message_box.js.

Signed-off-by: Georgios Kokosioulis <georgios.kokosioulis@cern.ch>