some refactoring to the files.js file API, now relatively generic...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
more refactoring, fixed a bug in toggleMark event handling and added bookmark indicator to global info...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>