comments: improvements and fixes

* Notes are extracted at DB insertion time, and not in the view anymore; this
allows for programatic comment insertion + note extraction;
* Fixes comments/ notes/ reviews JS: notably, fixes issues with record page tabs
switching; WIP.

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