Added Background Lock functionality

This adds a preference to lock the app as soon as it goes to the
background. The passphrase will be required when the app comes back to
the foreground.