[Download] Add listener type checking

Bug: https://crosswalk-project.org/jira/browse/XWALK-601
Merge pull request #237 from deqing/fix-listener-type-checking

[Download] Add listener type checking