Catch all Exceptions in the error protection code. Certain problems like not being able to open the database for writing will trigger this code, which will otherwise try to write to the database again and crash the app.
Since we are suppressing all exceptions from our code, stop throwing a RuntimeException when there is no API key. Instead, show an AlertDialog. Also don't bother looking for the apptentive_debug metadata key anymore.