Small changes in CollectorActivity (mostly comments); comment added in Controller; finalize() method added in Logger

Signed-off-by: Matthias Stevens <matthias.stevens@gmail.com>
Bug fix for crashlytics issues 33, 35, 37 & 47 (= github issue #14).

All these crashes were caused by a subtle bug in CollectorActivity, more specifically the interplay of the time-out behaviour, the onNewIntent() method and the onResume() method.

Explanation:
When a time-out happened the record of the current FormSession was made null. If the timeout was followed by the opening of a new project (or reopening of the same one) the onNewIntent() method would make the project and controller null, next the onResume() method would act as if it was resuming after a timeout because the timedOut variable was true (so it was unaware of the project switch/repopening), however because the controller was null it would *not* (re)start the project at all, which also meant the UI wasn't not reconstructed (leaving the UI for the previous project/intent on the screen).
Crashlytics issues 33, 35 & 37 then happened when the the use started using the collector UI (still tied to the old project and with a null record) after that point.
Crahslytics issue 47 (= github issue #14) effectively "replaced" the other crash issues because due to the introduction of the new blockUI functionality meant that the crash would happen earlier: i.e. when we tried using the null controller in CollectorActivity#dispatchTouchEvent().

Solution:
We effectively fixed the bug in multiple ways, to make it less likely to reappear due to future code changes.
- onNewIntent() now makes the timedOut variable false (this alone fixes all 4 crashes)
- no longer returning from onResume() halfway in the case of a resume from timeout (this alone also fixes all 4 crashes), nor in case of a resume from pausedForActivityResult
- added null-check on controller in dispatchTouchEvent() (this only fixes crash 47).

Also added a comment in Controller#discardRecordAndAttachments() to motivate why we make the record null.

Signed-off-by: Matthias Stevens <matthias.stevens@gmail.com>