comments: fix for JavaScript in record tab

* Moves modal binding to separate function in invenio.js;
* Adds macros for injecting CSS and JS.

Signed-off-by: Adrian-Tudor Panescu <adrian.tudor.panescu@cern.ch>