Enable usage as a library project.

These changes allow the project to be used as a Android library project.

I added a small section to the README, but feel free to change or expand the text.