Initial checkin: optional permissions sample code

This is an initial checkin of a small demonstration program
which demonstrates how optional permissions can be used.
This app can do three things, which require permissions:

* Vibrate the device (android.permission.VIBRATE)
* Access the internet (android.permission.INTERNET)
* Get the phone number (android.permission.READ_PHONE_STATE)

At install time, this app has zero permissions.  However, the app can
request that the user grant permissions, based on pressing the "Prompt"
button. The user can then choose to allow or deny the permissions.

Known bugs and limitations:
* Once a permission is granted, it currently cannot be revoked by the
application nor the user.
* Due to the way it's implemented, the INTERNET permission requires a
restart of the application. That isn't in the sample code.
* Getting the device phone number doesn't make sense for a tablet.

This code was mostly written by klyubin@google.com with heavy
modification by myself.

Change-Id: I620db52c4a1f10ac7aa604ba34f77f7ec03af023
8 files changed