move Utils to match FDroid

refs #3204 https://dev.guardianproject.info/issues/3204
move Apk and App classes to FDroid packages

These will then have to be normalized to FDroid's version.

refs #3204 https://dev.guardianproject.info/issues/3204
AppEntry.loadLabel() mirrors PackageItemInfo.loadLabel()

make AppEntry.loadLabel() take a PackageManager as the argument, and clean
up the code surrounding it a bit.

refs #3204 https://dev.guardianproject.info/issues/3204
purge some dead code: Utils.getBinaryHash(File apk)

Only Utils.getBinaryHash(File apk, String algo) is used.

refs #3204 https://dev.guardianproject.info/issues/3204
use e.printStackTrace() thruout to log Exceptions for clearer messages

Exception.getMessage() does not give much information, so replace with
Exception.printStackTrace().
add some buffering to speed up the hashing when making a repo

Reading from disk is usually best in 8k blocks, running the hash wants much
bigger chunks at a time:

https://stackoverflow.com/questions/1741545/java-calculate-sha-256-hash-of-large-file-efficiently?answertab=votes#tab-top
port to FDroid's current Apk class

* changes in Kerplapp's Apk class need to be folded into FDroid's
* FDroid's ValueObject is included only to support porting

refs #3204 https://dev.guardianproject.info/issues/3204
purge apkSourcePath and apkSourceName from Kerplapp's Apk.java

These were not needed at all, so we should not introduce them.

refs #3204 https://dev.guardianproject.info/issues/3204
rename Apk.file to Apk.installedFile for clarity

This File is referring to the installed .apk file on the device's local
filesystem, i.e. in /data/app

refs #3204 https://dev.guardianproject.info/issues/3204
port to FDroid's current App class

No real changes needed, just removed the unneeded init stuff in App() and
included some code from FDroid's App.java to make future comparison easier.

refs #3204 https://dev.guardianproject.info/issues/3204
a quick cosmetic sync to FDroid's Repo.java

refs #3204 https://dev.guardianproject.info/issues/3204
purge NSD support, later add mDNS support to FDroid using jmdns

Android's NSD is a nice API, but it turns out its flaky and only supported
on very recent Android versions.  So we'll use jmdns to support older
releases and hopefully work better.

refs #2900, #2467 https://dev.guardianproject.info/issues/2900
set minSdkVersion to android-7 aka 2.0

This is what FDroid will be moving to in order to support appcompat-v7

refs #3204 https://dev.guardianproject.info/issues/3204
ActionMode for local repo config

Now the local repo config feels a lot more Android-ish, with the ActionMode
being triggering when the user makes a change to the list of selected apps.
The ProgressDialog for generating the repo is now shown on top of the
KerplappActivity, and it is cancelable via touch outside or back button,
and the repo generation process will keep going in the background.

fixes #3200 https://dev.guardianproject.info/issues/3200
move webserver to a service for hosting all swapping stuff

The webserver thread is now in a separate Service that is meant to host all
the stuff related to swapping repos and apps.  Anything related to swapping
that needs to occur in the background so that the user can do whatever with
FDroid should go in this service.  That then provides an easy way to start
and stop swapping as well as provide a notification for when swapping is
active.

fixes #2908 https://dev.guardianproject.info/issues/2908
use global, static properies in Application for local repo state

The Application class is meant to provide a place to store global state of
the app, so let's use it!  FDroid uses it already, its called FDroidApp, so
the calls will get a lot shorter once in FDroid since KerplappApplication
will be replaced by FDroidApp.

Don't fear the global static properties!  Getters and setters suck often.
Or maybe I've just been too deep in Python these days ;)

refs #3204 https://dev.guardianproject.info/issues/3204
create RESTART msg and wire it up to LocalRepoService

This is needed to restart the webserver when the wifi or IP address changes
so that it can bind to the new address.  I added a STOP and START message
for good measure, they will be useful for controlling the webserver based
on the status of swapping.

fixes #2908 https://dev.guardianproject.info/issues/2908
move getSharingUri() to Utils for easier reuse
purge "Send to Local FDroid" test menu item, its unneeded now
move repo, ssid, and bssid to static vars in FDroidApp

Since there is only one local, device repo for swapping, it makes sense to
represent it using static variables in the Application subclass.  It makes
the code a lot simpler too.

FYI KerplappApplication will become FDroidApp once integrated.