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; }
  }
});
```
Use document scroll height instead of offset height to support body with absolute height
Use correct directory name for bootstrap contribution
Reflect sass readme change in css.html
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
fixes #10134 – dont use jquery offset directly because it uses sub pixel rendering
Merge pull request #10359 from ixti/patch-1

Pass $element to offset top/bottom calc funcs
note for #10486 add note about data-toggle dropdown dependency
Merge branch 'master' of github.com:twbs/bootstrap
fixes #11720 - Add events trigger to affix
add docs for affix events