Created separate network package, moved KerplappHTTPD there.

Moved the HTTPD subclass we use to the new network package. Updated
references to KerplappHTTPD as required. With coming Network Service
Discovery support there will be more network related classes. The parent
folder is looking a little cluttered lately.
Adding rudimentary Network Service Discovery.

Service advertisement is wired up to the HTTPD instance & wifi status.
Presently using the built-in Android support for NSD added since API
level 16 (Jelly-Bean). This will need to be addressed if we want to keep
the Kerplapp target-api at a reasonable level. Likely we will have to
translate the NsdHelper to use jmDNS or another external lib we can
ship.
Moved service reg/dereg, minimized NsdHelper to just service reg.
Adding preferences for network service discovery & repo name.

Now allowing network service discovery to be disabled (enabled by default). You
can also set a repo name which will be used for network service advertisement as
well as in the repo index.xml.
Use an FDroid specific NSD service type, based on SSL preference.

NSD service types follow a DNS SRV convention _protocol._transport used in
mDNS. Previously Kerplapp was advertising an _http._tcp service
generically. It makes more sense to advertise a _fdroidrepo._tcp service so
the FDroid client can run a discovery that it knows won't return generic
non-FDroid repo HTTP servers.

Further, we should advertise _fdroidrepo._tcp when the use_ssl preference is
disabled and _fdroidrepos._tcp when it is enabled to indicate to the
discovering peer whether we are advertising an HTTP or an HTTPS FDroid repo.

refs #2467
Fixing compiler warnings, standardized exception printing.

Cleared up the low hanging compiler warnings shown in Eclipse: unused
imports, etc. The SettingsActivity will have to be addressed in later
releases as it uses some deprecated methods.

Changed all of the catch() blocks across the application to use Log.e()
instead of err.printStackTrace();
set default repo name to the BRAND/MODEL of the device

Having the default repo name be the BRAND/MODEL should make it easier to
identify the device in question without broadcasting sensitive info like
unique IDs, names, or email addresses.  Users can still easily customize
the name in the Settings.

Now that we have a more descriptive repoName, use it anywhere it makes
sense to have it.
set minSdkVersion="5" to match FDroid's

This should help us keep in sync with that code base.
index.xml generation only works on android-8 and above

This fixes one issue on < android-9, but there are many others with XML
output that are not yet fixed.
wifi is not technically required, add uses-feature

Setting a WIFI permission automatically makes wifi a required feature, this
change removes that requirement.
move generateQrCode() to static method in Utils

This makes it easy to use in multiple Activities.
only instantiate NsdHelper on Android versions that support NSD
local repo port, IP and IP String as app global

This stores globally variables for the IP address, port number, and
string version of the IP address. They can then be easily used elsewhere,
in other Activities, etc.
create wizard for bootstrapping with QR Code and wifi

closes #2983
rename KerplappRepo to LocalRepo

This should hopefully make more sense in the context of being integrated
into FDroid.
Populate INDEX_CERT_ALIAS keystore slot when null.

In some cases it may be possible that a keystore file is present on disk
but does not have a keypair & self signed certificate stored in the
INDEX_CERT_ALIAS slot. Prior to this commit this would result in the
crash described in Bug #2999.

Instead of only generating the INDEX_CERT_ALIAS cert/keypair when the
keystore is first created we now separate keystore creation
& INDEX_CERT_ALIAS population so that it happens as required with loaded
keystores as well as newly created keystores.

Fixes #2999