app: fix race between input done and judgeResult
app: always clear timeout in finishResult
app: clear judgeResult in finishResult