Fix kickass magnet URIs.

Kickass encloses the magnet URI in a CDATA section which
get_element_text did not process.
Check if we’re already downloading an episode.

A race condition can occur when a trakt refresh occurs in between
completion of a download and the marking of its completion. So, check
if we’re already downloading an episode right before we add it.
Strip spaces after filtering show title.

Titles starting or ending with a punctionation mark could have leading
or trailing spaces which could prevent a match from being found.
Refactor transmission download provider.

Better error handling, code cleanups.