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

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