add CanonicalNameConstants and JClass refs for PowerManager and WakeLock
refactor permission check

- to allow checking for any permission
- added  a warning for library projects instead of ignoring the permission check
add @WakeLock
add Test for @WakeLock
Merge pull request #1130 from dodgex/863_WakeLock

@WakeLock