Reposition dropdown on window resize

Repositions the dropdown when the window resizes, uses debouncing to
prevent multiple executions (as some browsers fire the resize event more
than once).