Fixes #911 - ui.bootstrap.collapse TWBS 3.0 compatibility

In line with issue #911, I'm trying to get CSS class-switching behaviour
(and behaviour in general) in line with the stock TWBS 3.0 code.

This solution is more or less working, with the exception that there is
a brief flicker for the first expand() call (unless isCollapsed is initiallized
to false).

If anyone has any ideas about that, I'm all ears. And of course this code could
be cleaned up a lot, and tests could be added, for sure.