Auto positioning of tooltip

This patch changes the positioning of the tooltip when there is no room for the tooptip in the position it would normally show.

As discussed here: https://github.com/twitter/bootstrap/issues/7399