Fix tooltips with partial text

Some tooltips had a long text that was being partially shown because it was
forced to be in a single line.
Prevent notifications for being shown more than once, refs #966
Refactor base.js as a class to rebind events when modals are opened

It still has a lot of simple methods and bindings, but they are now all organized
in a method that's called when modals are shown to bind the events again.
Bindings are also scoped and unbound before binding them again.