Fix mixed line endings
Add log close function (based on PR-765-nate1280)
Fix for log file handle remaining open on restarts

Close the log file prior to starting a new subprocess so the log file doesn't remain locked by previous instance.
Change backup function and increment DB version
Add index on tvdb_id (tv_shows) and showid (tv_episodes)

+ Slight cosmetic changes to source to match order/comments (thezoggy).
+ Add duplicate show check before adding unique index
Merge branch 'fix_change_logger_close_dev' into development