split project into a 'library' and 'demo' modules

split project into a 'library' and 'demo' modules, modified AndroidManifest.xml to work with new module setup, and added appropriate gradle build files.