DebugModeActivity: set title in ActionBar to "Debug Mode"
ActionMode in "Find Keys" tab to provide button to import selected keys

When there are search results showing in the Find Key tab and the user
clicks on one of the results, the ActionMode bar shows up with "Done" and
"Import Keys".

refs #2808
show the ActionBar search field when switching to "Find Keys" tab

The only thing to do in the Find Keys tab is search for keys on the
keyserver, so it makes to always show the search field when switching to
that tab.

refs #2808
show progress spinner when waiting to load the list views
remove unused Intent extras when creating tabs in MainActivity
convert SelectKeysActivity to be based on fragment ActionBar

Use a button in the ActionBar to trigger the action on the selected keys.
Currently, this is only "Encrypt File To...".

refs #1633
convert EncryptFileActivity to receive arrays of keyIds and emails

Now, to send recipients to encrypt the file to, add a long[] of keyIds of
the recipients Key IDs as Activity.EXTRA_UID, and optionally, a String[] of
email addresses for the final SEND Intent as Activity.EXTRA_EMAIL.  If no
recipient keyIds are specified, then launch SelectKeysActivity to let the
user choose some.

refs #1633
when contacts sync finishes, trigger key lists to update

Since the key list views are now based on the Contacts database, the key
list views should update after the Contacts sync is complete so that the
database is up-to-date.  Previously, it was sending the broadcast at the
beginning of the operation.

closes #2765
fix "delete after import" to guarantee it deletes AFTER import

previously, the import happens in a thread, and the delete happened right
after the call to start the thread.  Oops.  Now it deletes the file after
the thread replies saying its finished.
add cmd line "list keys" for debugging
purge remnants of KeyListActivity from SelectKeysActivity

This should have happened at the get go, but late is better than never...
add null guards for crashes when rotating

Really, these things should not be null, but handling rotation is painful!
don't crash when receiving bunk error code from the List Adapter

Really, result.getErrorResid() should never have a bad value, something is
amiss... but this at least prevents it from crashing...
import key data via EXTRA_TEXT and EXTRA_STREAM in Intents

This makes it possible to just send ASCII key data in an Intent, and it
will get imported.

refs #2808
FileHandlerActivity: don't finish if showError() will be called

If everything works, we want FileHandlerActivity to disappear/finish as
fast as possible.  But if it needs to show an error, then the dialog's
OK button should trigger the finish().

Now that the error dialog shows, we don't need the extraneous Toast.
FileHandlerActivity: make sure to close Cursor after query
handle content:// URIs in Intents that don't set the MIME type

OI File Manager sends files in SEND Intents with an odd content:// URI and
does not seem to set the MIME type, so these tricks are necessary to handle
SEND Intents from OI File Manager.

refs #1646
add SignFileActivity for signing incoming files with default key

There wasn't any way to sign files yet, this is based on the approach of
EncryptFileActivity and just provides a very simple interface to the
signing procedure.
prompt to sign/encrypt when receiving non-PGP file

A file:// URI was already routed to encryptFile(), this adds a rough
prompt to choose Sign or Encrypt for any non-PGP file received via file://
or content://

refs #1646
use IOUtils.copy() for simpler, more reliable stream copying

It is really silly to have to implement this kind of thing again and again,
luckily Apache Commons IOUtils has done it for us.