Add shadow support for registerReceiver with permission

Permission restriction has been added to registerReceiver / sendBroadcast.
Intents will only be broadcasted to receivers that has matching
permission. If null is provided then it will simply mean no permission
is required.

Posting the BroadcastReceiver on a provided Handler has also been
added.  If you provide a Handler when registering your receiver that
receiver will be notified from that Handler.  Otherwise the main
application Handler will be used.

Added necessary tests to exercise this new support.
Merge pull request #755 from lixar/feature/add-shadow-register-receiver-with-permission-support

Add shadow support for registerReceiver with permission