Implement mozDownloadManager.adoptDownload as a certified-only API.
This also fixes and re-enables many of the existing dom/downloads tests
failures by virtue of cleanup and not running them on non-gonk toolkits
where exceptions will be thrown and things will fail. This should
resolve bug 979446 about re-enabling the tests.
There is very little benefit to having another layer of moz.build files, and
removing them will speed up the build a minimal amount. It also paves the way
for removing TEST_DIRS, which could simplify the build system somewhat.
* Unify OS_FILE_ILLEGAL_CHARACTERS
* Provide KNOWN_PATH_SEPARATORS in addition to FILE_PATH_SEPARATOR.
* Update nsExternalAppHandler to use KNOWN_PATH_SEPARATORS instead of
FILE_PATH_SEPARATOR when removing path separators.
* Fix DownloadsIPC.jsm when compiling with MOZ_DEBUG (would throw on undefined download.id).
* Add test for stripping out illegal characters when downloading.