Optimize resizing for Viewer and related widgets.

`Animation` and `Timeline` no longer listen to `window.resize`.  Instead the `Viewer` resizes them as needed.  Also added checks to avoid unecessary resizing when the current size and new size are identical.