Updated to ignore queued click events

If user clicks the submit button a lot of times, it might happen that
the displayNextQuestion function is called multiple times. The code in
this change tries to avoid that despite it seems there are still some
cases in which this happens.