Modernize some code in audio_timing_dialogue.cpp
Use boost range algorithms in audio_timing_dialogue.cpp
Fix issues with showing the previous inactive line

The "previous" line for the first line was actually the last line of the
file, and the previous line for the second line was ignored entirely.

Closes #1719.