fix(datepicker): Prevent from extending beyond the right screen edge

When input Datepicker is attached to is close to the right screen edge Datepicker's container may extend beyond the right screen edge leading to appearing of horisontal scrolling.
This fix addresses issue https://github.com/angular-ui/bootstrap/issues/1012 and probably some others.

PS: I'm not sure that calling updatePosition at each digest cycle is a good idea but I do not know any other way to achive the same.