Fix hidden.bs.tooltip and shown.bs.tooltip events firing too early in tooltip.js

* events fire only after the CSS animation is completed
* this fixes also events in popover.js (as it inherits from tooltip.js)
carousel: correctly reset when the slide event is prevented
Pass $element to offset top/bottom calc funcs

At the moment to make dynamic top offset calculator on multiple elements, one would write:

``` javascript
$('.my-affix').each(function () {
  var $el = $(this);
  $el.affix({
    offset: {
      top: function () { return $el.offset().top; }
    }
  });
})
```

This patch will allow to:

``` javascript
$('.my-affix').affix({
  offset: {
    top: function ($el) { return $el.offset().top; }
  }
});
```
don't create new Tooltip/Popover objects just to destroy them immediately
Add 'collapse' class back after expanding
Only preventDefault on click on [data-toggle="modal"] when the element is a link

In it's current state Bootstrap always prevents the default action for a click
event on `[data-toggle="modal"]` elements
(see https://github.com/twbs/bootstrap/blob/master/js/modal.js#L233).
Instead this should only happen when the element is a link.
Scrollspy acting up when targets are hidden

If elements are hidden using `display: none;` which are targets mapped by scrollspy, the plugin might select an incorrect or no menu item.

Checking if the target is visible solved this.
Update affix properly on scrollspy speedy scroll to top of page #11310

Fix scrollspy.js so as affix is updated properly when user scrolls fast
to top of page.

A fix for issue #11310.
Clear timeout on destroy.

Clears the internal timeout on destroy so that hanging timers are not fired.
Use document scroll height instead of offset height to support body with absolute height
Allow listbox AIRA role on dropdown component.
Use correct directory name for bootstrap contribution
roll back version numbers to avoid broken links in docs and readme (fixes #12000)
Merge branch 'master' of github.com:twbs/bootstrap

Conflicts:
	docs-assets/js/raw-files.js
don't roll back that comment
Merge pull request #12001 from soundarapandian/fix_typo_contributing

Use correct directory name for bootstrap contribution
fixes #10236
if affixed top add scrollTop to it position.top
calculate and cache pinnedoffset independent of scrolling for initial load
Merge branch 'master' of github.com:twbs/bootstrap

Conflicts:
	dist/js/bootstrap.min.js
	docs-assets/js/raw-files.js
fixes #10283
Merge branch 'slide-event-reset' of git://github.com/Rowno/bootstrap into Rowno-slide-event-reset

Conflicts:
	js/tests/unit/carousel.js