943 fix blank page after submission

The blank page on issue#943 was due to a time interval error. i.e. for some reason the time for last submission returned by Ona is a few seconds ahead compared to the local time (see below)

```
2014-11-07 12:21:24,327 [ERROR] : 2014-11-07T09:22:15.751Z **(last submission time on form)**
2014-11-07 12:21:24,328 [ERROR] : #<DateTime 2014-11-07T12:22:15.751+03:00> **(last submission time on form converted to local time zone)**
2014-11-07 12:21:24,328 [ERROR] : #<DateTime 2014-11-07T12:21:24.328+03:00> **(local time zone)**
``` 

The solution I had was this was to catch this error and return 0 seconds by comparing the submission time to itself if this happens (https://github.com/onaio/zebra/compare/943_fix_blank_page_after_submission?expand=1#diff-039e1a1c8bf4e2f61ccab4321965c7ccR46)
put the block from here to line 45 in a function, to DRY up lines 42-45 and 47-50