comments: fix for JavaScript in record tab

* Moves modal binding to separate function in invenio.js;

Signed-off-by: Adrian-Tudor Panescu <adrian.tudor.panescu@cern.ch>