Merge branch 'development'

Metadata: ALL -- Cleanup and standardize providers. Pull #786 #789

    Add banner, season banner season all poster and season all banner options.

    Remove use_banner poster override since now we have a banner option.

    This now means users can have both a poster and banner instead of one or the other (XBMC12+).
    Migrate legacy XBMC poster + use_banner setup to just banner option (keeps old functionality).
    Notice that on XBMC the banner and poster result in the same name, if you have both checked off it will just create folder.jpg with a poster since we don't overwrite existing metadata.

    Metadata: XBMC -- Strip leading/trailing spaces off Actor's names.

    Metadata: TIVO -- Generate rating off the episode not show data, convert 10 star rating to 4 star (ensure we end up with whole or half integers only).

    Metadata: MediaBrowser -- Re-order and cleaned up the .xml generation to match what MB3 itself produces.

    Removed Synology metadata since it does not appear to be actually used by Synology units.

Tweak RawHD/SDTV (webdl/webrip) and change default defer site. Pull #782

    Add additional RawHD format support that would allow (very specifically) for: Sherlock.S03E01.1080i.HDTV.H.264.DD2.0-CtrlHD
    Split webdl/webrip from the normal SDTV regex test, to allow more flexibility since it usually contains audio related tags/h264 (ex: Chosen.S02E01.WEB-DL.AAC2.0.H.264-2T).
    Fix HR.WS.PDTV.x264 from getting wrongly detected as SDTV.

Due to derefer.me request, switched new installs to another defer site, dereferer.org.

XBMC12+ Metadata support (initial support)

    Note that with the current settings you generate banner OR poster, not both at this time.
    Plans to support season##-banner.jpg / season-all-poster.jpg and having both banner+poster.jpg will happen in a future update.

Redirect fixes so that pages load with trailing / to reduce unneeded redirects. Pull #787

Update tvdb_api lib to 1.9 (for future support of dvd ordering). Pull #743

Add setting catIDs to NewzNab providers (ini only). Pull #771

Update FreeBSD init script. Pull #772

Update pnotify js, limit to a max of 5 onscreen notifications at a time. Pull #776

Fix UI setting of custom NewzNab sites that really do NOT require authentication (use 0 as apikey).

Tweak the Error Log Viewer page to show the 500 (instead of 30) most recent errors.

Tweak the extra_scripts execution to support unicode and fix the handle is invalid error.

Fix saving extra_scripts on config/hidden from creating empty list.

Quote search provider names to resolve issues if the name started with a number causing error unrecognized token.

Fix double encode UnicodeDecodeError errors when writing to the logger.

Fix UnicodeEncodeError exception in name_parser.

Trim trailing spaces when comparing ignore_words to resolve badly entered config.ini modifications.

Added version checking to the config migrator, follows how we handle our database checking to protect from trying to process ini that has been modified by forks/branches.

TVRage related fixes that deal with converting airdate to use locale abbrevations to resolve the error Unable to figure out the time from the TVRage data

Fix DeprecationWarning: BaseException.message on related database error messages.
Upgrade jquery ui 1.10.3 -> 1.10.4
 -- http://jqueryui.com/changelog/1.10.4/
Merge pull request #793 from thezoggy/dev--jui_update

Upgrade jquery ui 1.10.3 -> 1.10.4
Quick pass over our .js to cleanup some whitespace issues found. Added missing semicolons and parenthesis to make code more clear. Applied some slight optimizations and possible redirect fixes.
Merge pull request #795 from thezoggy/dev--redirect_fixes_js

javascript cleanup
Add routines to check or clean GUI input
Fix Exception on adding initial rootdir (ROOT_DIRS not set)

Because sickbeard.ROOT_DIRS is not set, converting first value into int results in ValueError: invalid literal for int()
Fix Exception on adding rootdir (unable to open NFO)
Merge branch 'add_checkbox_to_value_clean_host_url' into development

* add_checkbox_to_value_clean_host_url:
  Add routines to check or clean GUI input
Merge branch 'fix_adding_existing_show_never_returns' into development

* fix_adding_existing_show_never_returns:
  Fix Exception on adding rootdir (unable to open NFO)
  Fix Exception on adding initial rootdir (ROOT_DIRS not set)
Change Usenet-Crawler to https
Remove obsolete functions using open
Change open to 'with open' and exception IOError to 'EnvironmentError'

Use 'with open' when opening/writing files
http://sdqali.in/blog/2012/07/09/understanding-pythons-with/
The advantage of using a with statement is that it is guaranteed to close the file no matter how the nested block exits.
If an exception occurs before the end of the block,
it will close the file before the exception is caught by an outer exception handler.
If the nested block were to contain a return statement, or a continue or break statement,
the with statement would automatically close the file in those cases, too.

Switch exception to `EnvironmentError`
http://docs.python.org/2/library/exceptions.html#exceptions.EnvironmentError
Since it is the parent of IOError, OSError *and* WindowsError where available.

+ Cleanup test_lib a bit, still needs work.
+ Applied whitespace PEP8 fixes to the files touched.

closes gh-797
Merge branch 'change_usenet-crawler_to_https' into development

* change_usenet-crawler_to_https:
  Change Usenet-Crawler to https
Merge branch 'PR-797_with_open_thezoggy' into development

* PR-797_with_open_thezoggy:
  Change open to 'with open' and exception IOError to 'EnvironmentError'
  Remove obsolete functions using open
Change left over single quotes to double quotes
Change xbmc __init__ to follow XBMC_12PLUS
Change import cElementTree fallback ElementTree
Fix AttributeError exception on stripping actor name when None
Change genre check and add strip