Elaborate filename colon escaping scheme only for genymotion emulator bug.

Checking this in because it's a careful solution for a complicated
problem - unfortunately, a problem that is complicated due to a bug in
the emulator, and much more than is required for the actual, android
filesystem problem.

I'm going to check in a much simpler fix for the simpler general
problem, next.

Some details of the Genymotion problem, for posterity:

Android in the emulator is responding with a FileError.INVALID_MODIFICATION_ERR
when we try to save files with names that include:

- Character entities
- asterisks
- angle brackets

None of these are a problem in other Android devices - including the
SDK emulator, or any iOS devices.
Whoops - remove test entity line, include a note about simpler method.

"".replace() optionally takes a function parameter to apply to the
matches - provides a much simpler avenue for doing the desired
substitutions.
Escape ':' in filenames using simple approach.

Since we restrict escaping to only filenames with the sensitive character -
currently only ':' - we won't have any need for favorites migrations.

Also, extend dummyFileEntry to provide a toURL method, newly being used elsewhere.
Improve hygiene.
We have to URI-encode filenames including '%' signs, also.

Otherwise, a file named "with%3Acolon.txt would collide with the
transformation of "with:colon.txt".

There's a real chance that people have favorites that include "%" in
their name, so I will need to follow up to this with a favorites
migration.
Tests for new filename escaping stuff.
Escape arbitrary messages.

This sometimes includes filenames.
Explain why filenames containing '%' are also transformed.
Merge branch 'master' into issue-537-filenames-with-colons
Abstract FavoritesCollection.basePath(), for use in migration and FilesView.
Implement migrator for file names containing "%". Not yet hooked up, though.

Using cordova "fileEntry.moveTo()" or "fileEntry.copyTo()" fails with
FileError.INVALID_MODIFICATION_ERR trying to move (or copy) from, eg,
character%3Acolon.txt to character%253Acolon.txt. The move (or copy)
works fine for target name XXXcharacter%3Acolon.txt. Weird.
Merge branch 'master' into issue-537-filenames-with-colons
Rectify nameForFS(), so add and remove favs for files with ":" and "%" work.

Still have to get dirs with ":" and migration working.
Do filename (and dirname) transforms of *only* ":".

This simplifies things, at the cost of allowing for some rare (but easy
to contrive) collisions.  Details about that below.

This means that marking as favorites files with names containing colons
or percents, or in names of containing directories, now works. I have to
work on treating stuff so viewing is handled, as well.

About collisions - since colons are translated to their character entity
equivalents, favorites of files already of that resulting form will
collide. Eg, the favorites of files with the name "with:colon" will
collide with the favorites of files with the name "with%3Acolon" in the
same dir.

As it happens, along with Cordova's .getFile() URI encoding Android
paths, anyway [1], there's no perfect solution, and this appears to be
very much the minimal disruption/maximal coverage one. Not only because
we need no new migrations, since no existing favorite would have a
different name.

[1] https://github.com/SpiderOak/SpiderOakMobileClient/issues/537#issuecomment-54383708
... and revise the docstring according to the last commit.
Massage view paths for favorites files to account for ":" colon transform.

The non-favorites views are passed the fileEntry obtained by the
downloader, which takes care of the name massage, so the non-favorites
view code doesn't have to know about it.
Merge branch 'master' into issue-537-filenames-with-colons-merge

Conflicts:
	tpl/deviceViewTemplate.html
	tpl/fileItemDetailsViewTemplate.html
	tpl/fileItemViewMinTemplate.html
	tpl/fileItemViewTemplate.html
	tpl/folderItemViewTemplate.html
	tpl/progressDialog.html
	tpl/shareItemDetailsViewTemplate.html
	tpl/shareRoomItemViewTemplate.html
Remove residual stub for ultimately unnecessary migration.
Merge pull request #569 from SpiderOak/issue-537-filenames-with-colons

Issue 537 filenames with colons