Add Gradle support to lib

This allows easy integration with newer android projects when just the lib
folder is copied over.

Also increments the target SDK version to 18. This doesn't change the
minimum sdk requirement.