include languageButton in landscape layout

Fix a stupid mistake on my part, I added a new button to the regular layout
but not the landscape version of the layout.

java.lang.RuntimeException: Unable to start activity ComponentInfo{info.guardianproject.otr.app.im/info.guardianproject.otr.app.im.app.LockScreenActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
at android.app.ActivityThread.access$600(ActivityThread.java:123)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4424)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at info.guardianproject.otr.app.im.app.LockScreenActivity.onCreate(LockScreenActivity.java:96)
at android.app.Activity.performCreate(Activity.java:4492)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
... 11 more
sync up file layout with portrait version for easy comparing
fix crash when timer runs XmppConnection.handlePresenceChanged()

fixes #4276 https://dev.guardianproject.info/issues/4276

java.lang.NullPointerException
at info.guardianproject.otr.app.im.plugin.xmpp.XmppAddress.<init>(XmppAddress.java:26)
at info.guardianproject.otr.app.im.plugin.xmpp.XmppConnection.handlePresenceChanged(XmppConnection.java:2876)
at info.guardianproject.otr.app.im.plugin.xmpp.XmppConnection.access$2800(XmppConnection.java:130)
at info.guardianproject.otr.app.im.plugin.xmpp.XmppConnection$12.run(XmppConnection.java:3015)
at java.util.Timer$TimerImpl.run(Timer.java:284)
handle "opaque" xmpp: URIs from QR scan

unfortunately, Uri.getQueryParameter() only works with "hierarchical" URIs.

This fixes this crash:
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=49374, result=-1, data=Intent { act=com.google.zxing.client.android.SCAN flg=0x80000 (has extras) }} to activity {info.guardianproject.otr.app.im/info.guardianproject.otr.app.im.app.NewChatActivity}: java.lang.UnsupportedOperationException: This isn't a hierarchical URI.
at android.app.ActivityThread.deliverResults(ActivityThread.java:3432)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:3475)
at android.app.ActivityThread.access$1300(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1258)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5086)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.UnsupportedOperationException: This isn't a hierarchical URI.
at android.net.Uri.getQueryParameter(Uri.java:1662)
at info.guardianproject.otr.app.im.app.NewChatActivity.onActivityResult(NewChatActivity.java:1349)
at android.app.Activity.dispatchActivityResult(Activity.java:5446)
at android.app.ActivityThread.deliverResults(ActivityThread.java:3428)
... 11 more
fix crash when setting presence to "not subscribed"

java.lang.IllegalArgumentException: invalid presence status value
at info.guardianproject.otr.app.im.engine.Presence.setStatus(Presence.java:145)
at info.guardianproject.otr.app.im.engine.Presence.<init>(Presence.java:71)
at info.guardianproject.otr.app.im.engine.Presence.<init>(Presence.java:66)
at info.guardianproject.otr.app.im.plugin.xmpp.XmppConnection.handlePresenceChanged(XmppConnection.java:2883)
at info.guardianproject.otr.app.im.plugin.xmpp.XmppConnection.access$2800(XmppConnection.java:130)
at info.guardianproject.otr.app.im.plugin.xmpp.XmppConnection$12.run(XmppConnection.java:3015)
at java.util.Timer$TimerImpl.run(Timer.java:284)
remove defunct XMPP server from recommended list: rkquery.de

rkquery.de has been offline since 20 Apr 2014 00:23 UTC according to
http://www.jabberes.org/servers/
test whether pinned domains are working properly with the pins

This sets up a fake, simplified trust manager with only AndroidPinning,
then tries to connect to each of the XMPP servers that should be pinned:
Google, Facebook, jabber.org, and the list of recommended servers.
purge OtrContants, only a single value is used (helps with otr4j merge)
move OTRDATA TLV definitions to where the other TLVs are defined

This helps with the otr4j merge.  It shouldn't change the logic at all.
define generic Map type for getting ProviderSettings

This makes it possible to run tests by only creating a HashMap, rather than
having to create a whole Imps setup in the tests.
put XMPPConnection config entirely into a single method

This enforces keeping the config in a single place, and also allows the
config method to be used in tests.  Hopefully this did not change the logic
at all.
move creating SSLContent to method to avoid code duplication and ease testing
move XMPPConnection basics to setUp() and tearDown()
make getSSLContext() so we can choose which TLS version, fix testSettingCipherSuites()
make reusable ConnectionListener that includes the tested domain name

The ConnectionListener can be called after the test framework has moved on,
so sometimes it gets the failed connectionClosedOnError() call when it is
running another test.  Then it gets confused and quits, but in the wrong
spot.  This then points you to the real error in logcat, since it has the
domain name in question above the stacktrace.
test that the recommended domains support TLS v1.2
test whether setting cipher suites works in ConnectionConfiguration
switch out custom bouncycastle repackage for spongycastle

https://rtyley.github.io/spongycastle/
spongycastle is a standard repackage of bouncycastle for Android:

The Android platform unfortunately ships with a cut-down version of Bouncy
Castle - as well as being crippled, it also makes installing an updated
version of the libraries difficult due to classloader conflicts.

Spongy Castle is the stock Bouncy Castle libraries with a couple of small
changes to make it work on Android:

* all package names have been moved from org.bouncycastle.* to
  org.spongycastle.* - to avoid classloader conflicts
* the Java Security API Provider name is now SC rather than BC
* no class names change, so the BouncyCastleProvider class remains Bouncy,
  not Spongy, but moves to the org.spongycastle.jce.provider package.
WIP DO NOT MERGE: tests for unpinned domains, and the default trust manager