gd-nav-bar: add HiDpi support

Based on code from EvSidebarThumbnails in Evince.