Fixed issues with fading prev-next buttons

Rewritten the way the prev-next buttons are shown, solving an underlying
problem that caused them to fade incorrectly. It's now possible to
spam-click an image without getting a sudden shift in opacity on
buttons.