Handle json parsing errors when loading shift times history

Closes #1802.
Make SubsController ensure files are non-empty on commit

There have been a bunch of recurring problems with things not handling
zero dialogue lines or zero styles very well, so add one to the file on
commit if needed.

Closes #1814.