New media sync protocol and updates to media handling

The main features of this commit:
1 - Port of the new media sync protocol (released in Anki 2.0.27)
2 - Cleanup and update of Media.java to match Anki 2.0.27

Things to note about this commit:
- Tests for the Media class have been ported over.
- A new media database format has been added with the extension ".ad.db2". The .ad prefix is specific to AnkiDroid to prevent issues caused by copying the file to the desktop or vice versa. If an old media database is found, it will be converted to the new format (and if it fails for some reason, it creates a new empty database).
- File names are now normalized in NFC form before being added to the database and/or synced (previously used NFD, which is not the format used by Anki)
- Media-related regular expressions have been fixed and the group indexing scheme documented (Java doesn't support the named groups that python uses)
- Previously, a clean copy of the media database was cloned from the assets folder. With this update, it is created at runtime with SQL, so the file in assets has been removed.

Known issues;
The multimedia note editor bypasses the Media manager for most of its tasks which could lead to inconsistencies in the future.
force media resync on deauth
deauthing should reset lastUsn to 0 

(https://github.com/dae/anki/commit/a5d91314459d6945568757713ef2431841299f94)
(https://github.com/dae/anki/commit/f54f5870fa94e05e96bf72210a70934ebd2b734c)
Quick fix: throw non-file URLs into an Intent. Should deal with issue 2189.
Bump version to 2.2.1alpha1

@branch-specific
Fix NPE crash found in bugID 6548138210885632
Merge pull request #434 from timrae/bugID-6548138210885632

Fix NPE crash found in bugID 6548138210885632
Lets go directly to beta phase for hotfixes
Merge branch 'fix-for-2189' of https://github.com/ospalh/Anki-Android into hotfix-2.2.1
Bumped version to 2.2.1beta1
@branch-specific
Update 13-newfeatures.xml
Bumped version to 2.2.1beta2
@branch-specific
AnkiDroid case
Fixed Ankidroid case. Updated localizations
Bumped version to 2.2.1beta3
@branch-specific
Updated localizations
Bumped version to 2.2.1
@branch-specific
Blue icons
log instructions must be on 1 line
Commented logs
log instructions must be on 1 line