619 enable last modified header on api outputs

closes #619 
I have refactored the code as suggested above; The `last_modified_header` and `merge_dicts` functions are in `onadata/libs/utils/timing.py`