fix some leaks
introduced fixes for the output of the default PRNG having low entropy

original code is from http://android-developers.blogspot.jp/2013/08/some-securerandom-thoughts.html
and license is as follows.

 This software is provided 'as-is', without any express or implied
 warranty.  In no event will Google be held liable for any damages
 arising from the use of this software.

 Permission is granted to anyone to use this software for any purpose,
 including commercial applications, and to alter it and redistribute it
 freely, as long as the origin is not misrepresented.
Merge pull request #18 from zaki50/fix-leaks

fix some memory leaks in native code
Improve error handling for Gradle build
Enforce proper apk sanity checking
aapt was moved
Merge pull request #39 from KLab/improve-build-error-detection

Improve build error detection
aggghhh
Merge pull request #37 from zaki50/fix_low_entropy_secure_random

introduced fixes for the output of the default PRNG having low entropy